Hi Graham,
This file is a Smarty template, meaning that it can do dynamic things. If you want something different to be displayed for different users, perhaps adding some if/else clauses to decide what to display inside the Dataface_Application_Menu.html file. E.g.:
- Code: Select all
{if $ENV.username=='John'}
lt;ligt;Item lt;/ligt;
- Item 2
- ... etc ...
{elseif $ENV=='Sue'}
- Sue's Item 1
- Item 2
{/if}
- Common item
Or if you want to keep john and susan's menu in separate files you could do:
- Code: Select all
{if $ENV.username == 'John'}
{include file="John-menu.html"}
{elseif $ENV.username == 'Sue'}
{include file="Sue-menu.html"}
{/if}
Then you would add templates named "John-menu.html" and "Sue-menu.html" to your templates directory.
Or, perhaps you want to make something a little more extensible, and have files included with the naming convention "%username%_menu.html" so that John's menu would be stored in a template named "john_menu.html" and Sue's menu would be stored in a template named "sue_menu.html", etc... You could do something like:
- Code: Select all
{include file="`$ENV.username`_menu.html"}
Hope this helps a little.
-Steve