Creating conditional includes for widget info panel
#1
I am at my wits end.  I have tried every possible way to do this...

In my skin (a heavy mod of the excellent Silvio skin) I have widgets and the widgets will have a separate info panel.  Depending on what the widget is pointing to there will be different information displayed - so far not a problem.

My problem is that for neatness what I want is that depending on what the widget is pointing to I want too completely different formats and sizes of panel.  For ease lets call them InfoPanelLarge and InfoPanelSmall. (originality is not my strong point!). To use a specific example if Container.ListItem.DBTYPE=set I would use a small panel with only a small amount of info but if Container.ListItem.DBTYPE=Movie I would use the larger panel and include more info.

In Silvio the way the widget panel works is via an <include>.  So what I did was create a variable which will return true or false depending on what the widget is pointing to and tried <include content="InfoPanelLarge" condition="MyVariable"> and <include content="InfoPanelSmall" condition="!MyVariable"> that did nothing even though the variable would return the correct value for each widget.  Then I tried amending the variable so that it would return InfoPanelSmall or InfoPanelLarge depending on what the widget was pointing to so the include became <include content="MyVariable"> - again that failed to achieve anything.

My next attempt was to have just 1 include but containing both formats and using a control group and visibility condition - again with the visibility condition based on what the variable was returning.  Again this would not work - it either produced no info panel or only the first type of info panel.

I am obviously doing something wrong but I just cannot get my head around what it is and why and therefore cannot get a solution.  Can anyone help me
Reply

Logout Mark Read Team Forum Stats Members Help
Creating conditional includes for widget info panel0