I renamed layout.html 'scaffold.html' and adjusted it to suit my needs.
Furthermore, I have a number of controllers which all have their generic
view: controller/generic.html.
For example the cmsvcard controller has the following generic.html view:
{{extend 'scaffold.html'}}
{{if response.vcard_submenu and session.vcardsettings:}}
{{include 'cms/submenu.html'}}
{{pass}}
<div class="component-pane form">
{{if response.functionname:}}
{{include 'function.html'}}
{{pass}}
{{if response.flash:}}
{{include 'flash.html'}}
{{pass}}
{{if form:}}
{{=form}}
{{pass}}
{{include}}
</div> <!-- /component-pane -->
Some of the functions in the controller have their own view, for example
cmsvcard/index.html and cmsvcard/relatedNames.html, the problem is that
{{include}} does not include these views. Only scaffold.html and
generic.html are being displayed.
I tried replacing {{include}} with:
{{if request.function=='index':}}
{{include 'cmsvcard/index.html'}}
{{pass}}
{{if request.function=='relatedNames':}}
{{include 'cmsvcard/relatedNames.html'}}
{{pass}}
... which worked, until I added:
{{if request.function=='social':}}
{{include 'cmsvcard/social.html'}}
{{pass}}
For some reason this results in an error ticket referencing a line of code
in the cmsvcard/relatedNames view:
{{=row.Organization.name}}
I expected the views only to be evaluated when
request.function=='relatedNames' is True, but apparently this is not the
case. What am I doing wrong?
Kind regards,
Annet.