PHP code to add a link to the configured default home page The default home page of a site can be configured in Home » Administration » Configuration » System » Site information.

I have a node instance (with PHP code text format) and I need to insert a link to the default home page of my site, knowing that it can be reconfigured later. In other words, I can't put a static link, I need to fetch info from Drupal (if possible). 

How can I create such a link with a PHP code snippet? Is this possible?

Solution

I got away with:

&lt;?php
    $ttmp = variable_get('site_frontpage', url());
    echo '&lt;a href="/'.$ttmp.'"&gt;Home&lt;/a&gt;';
?&gt;
If you mean you want programmatically get the value in your Site Configuration, then this works for me: &lt;?php print variable_get('site_frontpage', url()) ?&gt; although I'm not sure this will work in multilingual environment.