Hi all,
cms/php details below. I am making a restricted content area for a band website. The content in this area will be viewed by band members.
I have got frontend users working fine with a login page. I have read up on custom content including calguy's pdf 'Hiding private content' and I am ok with this.
However what I cannot figure out is how this works with the news module.
I wish to allow the site editors to create news articles that will only appear on the restricted page. These news articles will fall under a number of different categories which may grow as the editor needs.
Is this possible? My apologies if this has been answered but I have had a long search through the docs and forums.
thanks
CMS Version 1.10.2
News 2.12.3
FrontEndUsers 1.16.8
CustomContent 1.7.3
php 5.3.8
apache/2.2.21
Restricted Content and News
Re: Restricted Content and News
So what is your question?
On the "restricted" page, simply call the News module {cms_module module='News' category='yourcategory'}.
If the user has permission to be on that page, then he'll see the news. Otherwise, he won't.
On the "restricted" page, simply call the News module {cms_module module='News' category='yourcategory'}.
If the user has permission to be on that page, then he'll see the news. Otherwise, he won't.
Re: Restricted Content and News
Also, add some ccuser logic to your detail template, otherwise it wil be very easy to just change the news id in the URL to view "restricted" news items
Code: Select all
{if $ccuser->memberof("band") || $entry->category == 'public'}
// display news item
{else}
// display "this news-item is for members only" or something
{/if}
Re: Restricted Content and News
Thank you for the responses.
to clarify...
there is a news page on the site which deals with general public news.
I wish to also have a restricted page that contains restricted news items. These news items will not be just one category - I wish for the site editors to set up as many restricted categories as they wish and for these news items not to appear on the public news page.
I am unsure of how I would set things up so as the editors can define multiple restricted news categories in future.
thanks for your help
to clarify...
there is a news page on the site which deals with general public news.
I wish to also have a restricted page that contains restricted news items. These news items will not be just one category - I wish for the site editors to set up as many restricted categories as they wish and for these news items not to appear on the public news page.
I am unsure of how I would set things up so as the editors can define multiple restricted news categories in future.
thanks for your help
Re: Restricted Content and News
Fork News to be RNews module that way you have 2 different module to work with, one Restricted one not...
Re: Restricted Content and News
Thank you I will investigate what forking is.
If I were to have just one restricted news category that displayed only on the restricted page, how would I make sure that the public news page did not show the restricted news category?
thanks
If I were to have just one restricted news category that displayed only on the restricted page, how would I make sure that the public news page did not show the restricted news category?
thanks
Re: Restricted Content and News
You would have to use the category='list,each,category,here' but then for every new category you would have to add it to that tag parameter...
Or do some fancy smarty calls in the News templates to not show that category...
Or do some fancy smarty calls in the News templates to not show that category...