Jump to content

Template Rules


pcw

Recommended Posts

Hi, im just developing some PHP software, for a site I am looking to build in the future.

 

I am wondering if the following is possible, and how I would go about implementing it.

 

From my admin area, I would like to have a page where I can set some rules.

For example:

 

Whilst on 'uploads' page if 'subscription' is equal to 'plus' then show 'uploads_plus' page

 

The words in ' ' are variables that can be changed from the admin area.

 

I kind of got the jist of it using

 

$_VARIABLE['subscription'] = "$subscription";

 

if ($_VARIABLE['subscription'] == "")

{

header("location: test1.php");

exit ();

}

else

{

print "Show this...";

 

But I have to actually place it on the page that I want changed and can be kind of long with all the elseif's I would have to use. I dont want to have to put this on every page, is there a way I could include this information in a file, and have the page refer to that file to check what page is defined by the rule?

 

Any help if much appreciated  :)

Link to comment
https://forums.phpfreaks.com/topic/144937-template-rules/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.