Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By haykelbj on
Hi,
I'm searching for a way to set the link of the logo in my template to the front page (language aware with the i18n module), so I thought it would do it to use the $site_frontpage variable for the link in my page.tpl.php file. But this variable sets the url of the actual page, i.e. if I'm on the page 'http://domain.ext/?q=en/admin/settings', $site_frontpage is set to the same value (http://domain.ext/?q=en/admin/settings). Is this a bug or did I misunderstood the meaning of $site_frontpage?
Bye.
Comments
workaround
For now I'm using:
url(variable_get('site_frontpage', 'node'))
to set links to the homepage which works very good. It's also language aware, i.e. when I'm viewing the site with the french language it returns '/path/to/drupal/root/?q=fr/node' (I have 'node' as standard front page) !!Shouldn't
$site_frontpage
also have the same value?