I am developing a theme for my site and want to add a logo to it with a link to the home page, I am currently using <a href="/index.php" to append the homelink to the logo, however in the event that moodle is not in the root that will not work, how is the homelink printed in moodle without printing anything but the link, I tried echo $home_dir but that prints an anchor with some predefined string like this <a href="thisisthehomelink" >Home</a>
The moodle directory is stored in config and can be accessed as
$CFG->wwwroot
so <a href="<?php echo $CFG->wwwroot; ?>">Home</a> should do the trick
Richard
(Edited by Mary Evans - original submission Thursday, 11 August 2011, 08:39 PM)
Added " " in a href!
Thank you, that is exactly what I was looking for.
Thanks Mary