Design and CSS styles
Version 5.x > Design and CSS styles > TabControl View modes: 
User avatar
Member
Member
Imran - 5/24/2011 3:30:29 PM
   
TabControl
Hi, I want to pad individual tab in tab controls with custom HTML Elements, so it renders it as
<Elem1>
<elem2>
<A href=...
</elem2>
</elem>

What "Item" I can use, in MACRO for "Use Client Script"?

I'm trying {%currentdocument.nodename%} but it doesn't show up

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 5/25/2011 4:13:47 AM
   
RE:TabControl
Hi,

Would you like to set UseClientScript property of the control using macro?

In this case you could try to use following way (it is an example which demonstrates how to use macro in properties - in this case will not work, see below):

<cms:CMSTabControl ID="CMSTabControl1" runat="server" MaxRelativeLevel="1" UseClientScript="<%= CMS.CMSHelper.CMSContext.CurrentResolver.ResolveMacros("{%currentdocument.nodename%}").ToString() %>"/>


But UseClientScript property requires value true or false, so I am not sure if I understand your goal. Could you please provide more details?

The tab control has property runat="server", therefore you could set property in the code behind if you need some context value.

CMSTabControl1.SomeProperty = CMSContext.CurrentDocument.NodeName;

Best regards,
Ivana Tomanickova

User avatar
Member
Member
Imran - 5/25/2011 8:34:17 AM
   
RE:TabControl
I was able to write a custom web part that wraps individual elements. Thanks.

Btw, how can I create my own properties? E.g. a text area like HTML envelop?

User avatar
Member
Member
Imran - 5/25/2011 10:16:09 AM
   
RE:TabControl
Nevermind. I was able to do so in web part properties.