0
votes

I am not an expert on themes but i would like to know if it is possible to accomplish that:

Once i pull a panel into a facet i am hiding the panel by disabling the output tag and setting a special css class only for the designer client.

Has somebody tried to do that automatically in themes by checking if the panel is in a facet(Maybe ask for the key: property)?

I have tried to change the panel but i dont know how to set a certain style class based on a property of the panel.

1
Can you rephrase the question? What do you want to achieve? It doesn't seem to be clear. You want a design time behavior or a runtime behavior? What would that be?stwissel
If i have a custom control and want to add more then one control into the facet i have to add a panel. To keep the bootstrap output correct i very often have to go into the panel and disable the output tag. I would like to create a theme that is doing that for me once a panel has the attribute key:*user2316219

1 Answers

0
votes

To my best knowledge: A theme styles content rendered, not attributes that define if content gets rendered or not.

You have 2 options you could use:

  • create your own little extension library with controls you want to use everywhere. Add one 'containerPlaceholder' (or whatever you would call it) that doesn't render any own output, but only it's children.

  • use a snippet you simply paste into your source code.

  • don't use a panel or div, but add your custom controls to the callbacks. Makes your XPage more readable (that's what I do)

Hope that helps