The problem is that neigher the menu or the theme master pages have the username variable set at this point (passed by smarty).
To test this I went in and added the username var to the actual page name input under admin pages and no good, then i went and added the username variable to the lang key which is {text key='base+dashboard_heading'} which is the name of the page title at the top of that page, and by default it should read Dashboard (for the dashboard page) if you want to find it in language, and again no good.
So i took a look at the theme master pages and username is not yet set for the page, meaning its not assigned by smarty for this process. So what this means is that you would have to do a code mod to do this.
It would require assigning the username variable to the template by setting it in smarty template engine for this process (php file) and then passing it to the theme master html pages.
The master pages would also need have a cod mod, as every page header is static in the sense that it displays heading like so
{if $heading}<h1 class="ow_stdmargin {$heading_icon_class}">{$heading}</h1>{/if}
so that means whatever is in the value of heading, so you would have to isolate the dashboard page and change how it displays that heading when it sees it.
Hope that helps..
Rick,
in this case Aliia as smart as she is bypassed that need by grabbing the array value and using the lang file instead of the html file to display the value, thumbs up Aliia. I admit i was thinking inside the box on this one...
So rick you dont need to worry about smarty in this case.
But to answer your question, smarty is a template engine, it is how Oxwall (and lots of other scrips) pass values from the php files to the html files for user output and to use those vars in a html file.
Simply put, the php file has a variable, it assigns a variable value to smarty so that it can be referenced in an html file.
something like this for example:
$this->assign('value', $value); // which is ('value to reference in html file', $php variable value);
so now we can do this in the html file
{if $value}
do whatever
{/if}
if we did not use smarty we would have to make all files php files in order to reference php variables.
It really depends on what you are doing. The functions in that file usually speak for themselves as far as function name. But remember there are also other system plugin files which also compliment the process as well as core and other files. You really cant put it in black and white perspective like that. This file is just one piece of the puzzle.
Thanks Daisy…Ok got it working in the “dashboard” page “heading” but what do I need to do to make the users name appear in the menu title? That would be awesome to have working!
That might be a challenge, from what i remember that menu is built as an content array and im not sure it would be practicle to do all the changes to make that happen.