• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Expression to show widget on item page

NinaMcI

Member
Showcase
Hi,
I can't work out what expression to use in order to display a widget on a particular showcase item page.
Any help would be gratefully appreciated.
Thanks
 
What function are you using? There are so many different ways of doing things, I need you to be more specific. Maybe screen shot the function you are wanting to use.

The BEST way (IMO) is to use the HOOK method. You edit the showcase item template and add a Custom HOOK (just a simple line of code) at the exact location you want to display the widget and then create the widget and tell it to use the Custom HOOK.
 
Hi Bob,
I'm using the widget framework. I've entered the hook position, hook:showcase_item_private_controls which works fine.
What I'd like to know is how can I display this widget on a specific item page only (item id 126)?
 
What I'd like to know is how can I display this widget on a specific item page only (item id 126)?
Im not sure that is possible. The only way I can think of is to TRY (not tested) adding your OWN hook so that you can wrap the hook with a conditional (checking the item id) so that the hook is only exposed for that item. Again, UNTESTED and I am not sure that would even work (depending on how xfrocks is checking for hook locations). If its possible to check a discussion thread ID, then its possible to check a showcase item ID.
 
Back
Top