Question about page access based on settings stored in DB
Posted: Sun Aug 22, 2010 3:48 pm
Hey guys im trying to work out how to do a bit more with custom content.
So that if a setting in a table in the DB is set to ON then content A will be displayed or if its set to OFF content B would be displayed.
We use custom content at the moment im just trying to work out how to make my own function that can be accessed from the templates.
Atm i use this code
I would like to have something like
I just cant work out how to write a function so that it can be used here
Any help would be great
So that if a setting in a table in the DB is set to ON then content A will be displayed or if its set to OFF content B would be displayed.
We use custom content at the moment im just trying to work out how to make my own function that can be accessed from the templates.
Atm i use this code
Code: Select all
{if $ccuser->loggedin() && $ccuser->memberof('basicmembers')}
{content}
{else}{/if}
Code: Select all
{if $ccuser->loggedin() && $ccuser->memberof('basicmembers')}
{if $mymod->systemstatus() == 'OFF'}
{content}
{else}
please wait until this page is online
{/if}
{else}{/if}
Any help would be great