Jump to content

Append Application URL to Base URL


Recommended Posts

Hey there,

I have a small question about the URL the main logo points to.
In the template "logo" href attribute is set with {setting="base_url"}. I now want to change that link within some (or all) applications to link back to that app and not to the root path/ default app. So if I'm in the forum I want to get /forum, in the gallery /gallery and e.g. in the calendar the link should be /calendar (the blog application is our default app).

Is there any way to do this with stock IPS features or would this require some coding?

Thanks in advance for any help

Link to comment
Share on other sites

{{$app = \IPS\Dispatcher::i()->application->directory;}}
{{$url = $app != 'core' ? "app={$app}" : 'app=core&module=discover&controller=streams';}}
<a href='{url="{$url"}' .....>

This works in all apps but the core, which would go to the contact us form. That's why I put the URL to the activity stream in there.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...