Jump to content

Easy way to change WHMCS URL in Smarty?


Recommended Posts

This is a Smarty question for WHMCS, but I could not find the good answer on Smarty's website.


I want to manually create Language Selection buttons on my WHMCS template. My current code looks like this:


<a href="$_SERVER[REQUEST_URI]?language=french"><img src="templates/{$template}/img/flag-fr.png"></a> | <img src="templates/{$template}/img/flag-uk.png">


The code above works great if the WHMCS URL that the user is on does not have any ?something=anything attached to it. For example, if the URL is this:




Then the code above will correctly display the link here:




But if the WHMCS URL is this:




then the code above will show a bad URL because it uses 2 "?" like this:




So I am trying to figure a way to change the 2nd "?" to "&" so the URL looks correct like this:




Any ideas or methods for doing that?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated