I'd appreciate some guidelines about certain variables. For example $menu variable - sometimes it prints "logged in as" and sometimes some course navigation popup (with no "logged in as" text). Or the $loggedinas - I tried to use it right after opening <body> tag and it prints nothing - but the same variable in footer.html prints out "you are logged in as..." text.
Where can I find a complete list of applicable variables with some short description?
Regards, Borek
I'm using Himmat's Elektrik15 theme. Ideally, I'd like every page to have the "you are logged in as" line in the header, and no pages to have the navigational "jump" menu. (For one thing, the jump menu messes up printing for "web page" resources.) Like Borek, I'm puzzled why $menu does what I want on the first page, but provides the jump menu for other pages, even though the line of code looks identical in both sections.
Hi Borek and Pamela,
I also want exactly the same, for the same reasons explained by Borek in his first post.
It would be very useful to Moodlers creating or customizing themes to have a full, documented list of all the variables which are available to the header.html and footer.html files.
Any Moodle guru listening?
Joseph

In file header.html, instead of:
<?php } else if ($heading) { // This is what gets printed on any other page with a heading ?>
<div id="header">
<div class="headermain"><?php echo $heading ?></div>
<div class="headermenu"><?php echo $menu ?></div>
</div>
<?php } ?>
write: <?php } else if ($heading) { // This is what gets printed on any other page with a heading ?>
<div id="header">
<div class="headermain"><?php echo $heading ?></div>
<div class="headermenu"><?php echo user_login_string($usercourse, $USER) ?></div>
</div>
Enjoy!Joseph
That 's Great Joseph !!
I have another question for you . How I bring the language selection select button seperately ? ie , look at he below table for the form which I require ,
The user information,logged in as must come here | some blank space | The language selection box must come here . |
Can u help me in this regard too..
Thanks !!
IMPORTANT NOTICE
Upon upgrading to Moodle 1.6 I found out that the hack explained in my post dated 19 Sep. 2005 caused the following problem.
- Log in as Admin or course teacher.
- In the People block, click on Participants.
- Select one of the students enrolled into this course and click on the Log in as button and Continue.
- Browse the course, being [User Admin] logged in as [student name].
- When you want to revert to Admin login, click on the [User Admin] link.
- You get an error message "Course ID was incorrect".
Solution to avoid this problem (valid for 1.5 through 1.6). In the above hack, instead of:
<div class="headermenu"><?php echo user_login_string($usercourse, $USER) ?></div>
put
<div class="headermenu"><?php echo user_login_string() ?></div>
i.e. user_login_string() must be empty!
Joseph
Borek and Joseph,
please look at the MoodleDocs Theme Description for a list of applicable variables with some short description.
I hope this helps
Urs
Thanks for the pointer. I guess this list of variables could still be expanded, but it is useful as it is.
Joseph
I'm not sure whether you got my point .. <?php echo user_login_string($usercourse, $USER) ?> gives the 'you are logged in as ' info alone . similarlly , how can I bring the language selection select box in view . what is the respective method / variable that does this ? . as of now , the variable '$menu' gives both the 'you are logged in as ' text and the select box in view .
Thanks ,
Shaan
You are posting to a 4-year-old discussion thread with a rather cryptic "Have a same problem" message. Could you state exactly what your problem is, and whether the replies already provided in answer to the original poster have been useful to you?
Thanks
Joseph
How I bring the language selection select button seperately ? ie , look at he below table for the form which I require ,
The user information,logged in as must come here |
some blank space | The language selection box must come here . |
Can u help me in this regard too..
That's my problem...
Can you help with it?
http://moodle.org/mod/forum/discuss.php?d=128599
And here you will find some more hints on the underlying code in header.html and footer.html:
http://moodle.org/mod/forum/discuss.php?d=138137
CSS FAQ and Themes FAQ are good starting points for learning more about CSS and theming.
hth
Frank