View Single Post
  #2  
Old 06-17-2014, 01:00 PM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 19,640
IntoRain is on a distinguished road
Default

In smarty this is quite easy to do.

Open class_template, look for a function called assignTemplateVars(). Inside, get two variables, one for the clan (the one you talked about) and one with the content you want. Assign them to the template like this:

$this->assign("clan",$clanVariable);
$this->assign("optionalContent",$contentVariable);

In your template.tpl, search for the part where {$document_content} appears. Replace {$document_content} with:

{if $clan != 'none'}
{$document_content}
{else}
{$optionalContent}
{/if}

This basically makes it so that while their clan is "none", all they ever see is the optional content you created, in place of the document_content, in all pages
__________________


asp.net stole my soul.

Last edited by IntoRain; 06-17-2014 at 01:02 PM.
Reply With Quote