Announcement

Collapse
No announcement yet.

Using conditionals and vb code on CMS pages

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • princesspepper
    started a topic [CMS] Using conditionals and vb code on CMS pages

    Using conditionals and vb code on CMS pages

    Hi there.

    I have some code on a page that I want to display only to certain usergroups and I also want to include their username if they can see it. How would I write this, and do I have to use a PHP or Static HTML content type in order to do it?

    This is what I can gather I should do... is it correct?...

    Code:
    <vb:if condition="is_member_of($bbuserinfo, 5,6,7)">
    
    
    <div>
    <p>Hello {vb:raw bbuserinfo.username},</p>
    
    
    <p>Stuff for admins is displayed here</p>
    </div>
    
    
    <vb:else />
    
    
    <p>I'm sorry. You are not authorized to view this page.</p>
    
    
    </vb:if>
    at the moment this is not working if I put the code in an HTML content page, so I'm not sure what's going wrong.

    Thanks for any help in advance!
    Last edited by princesspepper; Sat 10 Sep '11, 5:47am.

Related Topics

Collapse

Working...
X