Hiding private content

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
EoinDubh
Forum Members
Forum Members
Posts: 34
Joined: Sun Feb 28, 2010 12:52 am

Hiding private content

Post by EoinDubh »

I am moving a site from phpWebsite 9.x to CMSMS 1.8.2 and trying to keep the look and feel as similar as possible. I have all the pages created but am running into a problem with managing access to pages that are for members only. I have read Robert Campbell's excelent article on Hiding Private Content in CMS Made Simple and as long as I use the same templates as the article everything works OK. However the site is using the CSSMenu left + 1 column template and the  cssmenu template which is quite different from the simple_navigation template. I have the template working i.e. it redirects to the login page if a user who is not logged in clicks on a restricted link, but I am having a problem with hiding the menu link altogether fron a user that is not logged in.

I think that the issue may be where I am placing the code in the menu template, but so far all I have accomplished is displaying no menu to anyone so I have backed the code out.

For reference, the original site is http://clan-donald-usa.org/cdusa/ and the CMSMS site is [url=http://clan-donald-usa,org/CDCMS/]http://clan-donald-usa,org/CDCMS/[/url].

Thanks in advance for ant pointers.
ChrisF
Forum Members
Forum Members
Posts: 35
Joined: Sat Dec 12, 2009 7:52 pm

Re: Hiding private content

Post by ChrisF »

You can use a smarty if/else tag in your template around the link. If the user is logged in it displays the link, if not it is either blank or displays something else.
EoinDubh
Forum Members
Forum Members
Posts: 34
Joined: Sun Feb 28, 2010 12:52 am

[Solved} Re: Hiding private content

Post by EoinDubh »

After thinking it over, I decided to leave things as they are for now. If someone is a member of the organization and has not yet requested a login they can at least see all the menu items and if they try to access a restricted item they get the login page. So that works.
Post Reply

Return to “CMSMS Core”