Implemented Add Permissions for Widgets

This suggestion has been implemented. Votes are no longer accepted.
Please add widgets to the permissions system. I'd like to add a sidebar for guests only and currently cannot do so. I imagine there are many reasons for people needing the ability to display widgets based on user group...
 
There's two things that can help for right now.

1) Create the widget that you want, but don't assign it to a position. Give it a "widget key" for example "my_widget".
2) Create a new "HTML" widget in the desired position. Check the "Advanced mode" box. In the "Template" field type:
HTML:
<xf:if is="!$xf.visitor.user_id">
    <xf:widget key="my_widget" />
</xf:if>
That should give you the desired effect.
 
There's two things that can help for right now.

1) Create the widget that you want, but don't assign it to a position. Give it a "widget key" for example "my_widget".
2) Create a new "HTML" widget in the desired position. Check the "Advanced mode" box. In the "Template" field type:
HTML:
<xf:if is="!$xf.visitor.user_id">
    <xf:widget key="my_widget" />
</xf:if>
That should give you the desired effect.
I'm trying this - but I keep getting an error when trying to save #2...

Oops! We ran into some problems.
Template titles must be unique. The specified title is already in use.

Even if I don't have any title at all...

I'm trying to use this with an HTML widget. So does having the actual widget I want displayed AND they one using Advanced mode cause some kind of conflict?
 
Last edited:
Now my next question - is there a way to customize what displays in this specific widget so that it doesn't appear as the same as the sidebar on the main page?
 
Heh, that's a nice thought. As simple as it looks, it's far from it. To make that happen, we have to compile all of the navigation stuff to PHP code. Not insurmountable, and it was considered at one point, but it's a fairly huge undertaking.
 
Heh, that's a nice thought. As simple as it looks, it's far from it. To make that happen, we have to compile all of the navigation stuff to PHP code. Not insurmountable, and it was considered at one point, but it's a fairly huge undertaking.
Maybe this would help?
0E217711-F114-4821-969E-C1D130F9FF47.webp
 
Back
Top Bottom