External Site Disclaimer

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
andrewvideouk
Forum Members
Forum Members
Posts: 129
Joined: Thu Aug 20, 2020 10:49 pm

External Site Disclaimer

Post by andrewvideouk »

Has anyone done a External Site Disclaimer on there sites? Also how did you do it and what method.

One way I can do is have a pop messege but the problem that you don't have much space to for a disclaimer.

I would like to have the External link go to a page with a External Site Disclaimer and with the External link.

Cheers.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1316
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: External Site Disclaimer

Post by DIGI3 »

You could pass the link as a parameter to your disclaimer page, so you'd do something like:

Code: Select all

<a href="{cms_selflink href='my-disclaimer-page'}?external=https://link-to-external-page" class="external-link">External Page Title</a>
Then in your disclaimer page:

Code: Select all

{if $smarty.get.external}
  <a href="{$smarty.get.external}" target="_blank" rel="noreferrer noopener">Click to go to external site</a>
{/if}
You might want to also pass a title of the external url which you'll have to encode if you're using url parameters, but should be easy enough. You could also do session variables and other methods, but the above is probably the easiest.
Not getting the answer you need? CMSMS support options
andrewvideouk
Forum Members
Forum Members
Posts: 129
Joined: Thu Aug 20, 2020 10:49 pm

Re: External Site Disclaimer

Post by andrewvideouk »

Thank you. I like that idea.

I could do something like this. I will try it tommrow.

Code: Select all

<a href="{cms_selflink href='my-disclaimer-page'}?external=https://link-to-external-page?title={$extitle|escape:'url'}"External Page Title</a>

Code: Select all

{if $smarty.get.external}
  <a href="{$smarty.get.external}" title="{$smarty.get.extitle}" target="_blank" rel="noreferrer noopener">Click to go to external site</a>
{/if}
Post Reply

Return to “The Lounge”