Conditional additions to a detail page

3 posts by 2 authors in: Forums > CMS Builder
Last Post: November 24, 2010   (RSS)

Re: [steve_e] Conditional additions to a detail page

By Jason - November 16, 2010

Hi Steve,

Yes, this shouldn't be a problem. You can put this drop down in your article section. I'm assuming that if it's a "Visitor's Article" then anyone can see it (ie, no check necessary) and if it's a "Member's Article" you need to see if the person logged in has the appropriate permissions.

Since I don't know how your forum software works, I can't give you a specific example, however, it would probably work something like this:

<?php

if($record['article_type']=="Member's Article"){
//Check if user can view the article.
//If "Yes" then dispaly
// else, redirect.
}
else{ //Visitors article, display normally
}
?>


Hope this helps get you started. Let me know if you run into any issues.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Conditional additions to a detail page

Thanks Jason (and sorry for the delay in replying - lost track of the post).