Show or hide links on specific circumstances

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
davidsimon0579
New Member
New Member
Posts: 1
Joined: Sat Jul 14, 2018 8:00 am

Show or hide links on specific circumstances

Post 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
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1627
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Show or hide links on specific circumstances

Post 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
Not getting the answer you need? CMSMS support options
Post Reply

Return to “CMSMS Core”