Page 1 of 1

Show or hide links on specific circumstances

Posted: Sat Jul 14, 2018 9:02 am
by davidsimon0579
I created few pages. I would like hide links that points to specific pages.
My site is in English, but sometimes I publish article in Croatian. I could use geo IP locator to locate where is visitor from

Re: Show or hide links on specific circumstances

Posted: Sat Jul 14, 2018 2:31 pm
by DIGI3
You can use Smarty to conditionally hide things. Set a variable with your geolocator, e.g. {$region='croatia'} for visitors in the Croatia area, then

Code: Select all

{if $region=='croatia'}
<link to Croatian article>
{else}
<link to English article>
{/if}
Documentation for Smarty conditionals is at https://www.smarty.net/docs/en/language.function.if.tpl