Hi,Simple question: In the output HTML SitePublisher/LiveSite creates a DIV tag for each component placed in a page; something like <div style="width:964px;min-height:35px;height:auto !important;height:35px;margin:1px 18px 0 8px;display:inline;float:left;" class="iw_component">...</div>Because there is no ID associated with the DIV tag, it is almost impossible to apply or modify a style for only one component using CSS only. This makes me wonder why there is no ID field in the "Component Properties" dialog ...Has anyone else had faced this issue and managed to find a reliable and applicable way around it?Our TeamSite version is 6.7.2 SP1.Thanks.
Thanks for the reply.I understand that in "fixed area layout" you'll get an ID for each component, but my question was about the "div layout", sorry that left it out. In "div layout" no ID is given to the DIV tags. (Even for "fixed area layout" the random ID that is generated is not much helpful; as it is not extensible and there is no semantics behind it). And as for not wanting to put the "div layout" styles in the skin, we would like to be able to dynamically change the style depending on the browser and the device that is loading the page. We could not achieve that if we put the style in the skin.Any other thoughts?Thanks.
<div class="MyComponentClass"> <xsl:attribute name="id">C_<xsl:value-of select='/Properties/@ComponentID' />_div</xsl:attribute> ...</div>
<div style="width:964px;min-height:35px;height:auto !important;height:35px;margin:1px 18px 0 8px;display:inline;float:left;" class="iw_component"> <div class="MyComponentClass"> <xsl:attribute name="id">C_<xsl:value-of select='/Properties/@ComponentID' />_div</xsl:attribute> ... </div></div>
Well I don't think putting the style in the Appearance XML would work for me. Because every time a style change has to be made we would have to update the component and hence all the pages that use this component.
And as for not wanting to put the "div layout" styles in the skin, we would like to be able to dynamically change the style depending on the browser and the device that is loading the page. We could not achieve that if we put the style in the skin. Any other thoughts?
RonaldV, the component's ID, unique across the page, is available... see my previous post..
Just curious - I thought the component id wasn't to be relied upon for site-customizations as it's not guaranteed to be the same if you migrate the store (like from DEV to QA to PROD) or if you upgrade and do an iwmigrate...(This is in the context of using it for a CSS directive)
you can modify (or add your own) page-xsl (located in httpd\webapps\content_center\WEB-INF\classes\com\interwoven\xsl\runtime).