Copyright 2007 Daiji Takamori Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -------------------------------------- DjangoTemplates -------------------------------------- A simple plugin to provide Django-style templates Create a template as you normally would. If you want to create a layout, remember to prefix the name with an underscore. If you are using a relative path then you will need to prefix the path with an underscore instead. Use to define a section of replaceable GSP. In your views (or even in another template), use where you'd like to extend a given template. Replace the sections you'd like to replace using . EXAMPLES: g:declareBlock ----------------------------- The following (defined in a template) will define a block named "section" with default content "Some default content". Some default content g:extends and g:block ----------------------------- The following will extend a template named "_templatepath.gsp" in the current directory, but replaces the section named "section" with "Replaced default content". The template is prefixed with "Some pretext" and suffixed with "Some posttext". Some pretext Replaced default content Some posttext --------------------------------------