Difference between revisions of "How to make part of theme visible only to administrators"

From JReviews Documentation
Jump to: navigation, search
Line 1: Line 1:
 
 
Use this code:
 
Use this code:
  
 
<source lang="php">
 
<source lang="php">
<?php if($this->Access->isAdmin():?>
+
<?php if($this->Access->isAdmin()):?>
 
   // Everything here will be available only to admins
 
   // Everything here will be available only to admins
 
<?php endif;?>
 
<?php endif;?>

Revision as of 15:41, 23 August 2011

Use this code:

<?php if($this->Access->isAdmin()):?>
   // Everything here will be available only to admins
<?php endif;?>