Jump to content

Creating dynamic URLs in Templates


Recommended Posts

I want to build a dynamic URL inside of template, which looks similiar to this:

<a href='{url="app=botuserpanel&module=userpanel&controller=userpanel{{if $tab->area}}&area={$tab->area}{{endif}}"}'></a>


Because of my if expression it won't build the URL correctly, the result looks like:

<a href="{url="app=botuserpanel&module=userpanel&controller=userpanel&area=sessions"}"></a>

. Is there a way to build the URL correctly with my IF expression? For example is it possible to build the URL string upfront (but still inside of my template), pass that to {url=} so that it will work?

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...