Announcement

Collapse
No announcement yet.

Block access to widget for guests

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

  • [CMS] Block access to widget for guests

    I created a new html widget but I only want it viewable to registered members. Can I do this? If so, how?

  • #2
    This is a perfect example of a use for a template conditional. Make a new template in admincp > styles & templates > style manager. The template contents below should work. The red is the part that decides where to show, because not-logged-in users will have id = 0.

    <vb:if condition="$bbuserinfo['userid'] > 0">
    <div class="cms_widget">
    <div class="block">
    <div class="cms_widget_header">
    <h3>{vb:raw widget_title}</h3>
    </div>
    <div class="cms_widget_content restore">
    {vb:raw static_html}
    </div>
    </div>
    </div>
    </vb:if>
    Please- I'm not tech support. Don't send your problem reports to me unless I've asked you to.

    Comment


    • #3
      This worked perfectly. Thank you!!

      Comment

      Related Topics

      Collapse

      Working...
      X