Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have creatd a content layout from structure of divs, its made so that i only have to define the div containing the rest of the divs to scale in size and keeps the laoyout.
It all works great, but when i add this layout to my XLTS code and try to render it, everything gets nestd wrong.
Here is the paragraph within the XLTS
<xsl:for-each select="$currentPage/*"> <div id="contentNewsList"> <div id="contentT"> <div id="contentTL" /> <div id="contentHeadline"> <div id="contentHeadlineL" /> <div id="contentHeadlineTxt"> <xsl:value-of select="articleHeadline" disable-output-escaping="yes"/> </div> <div id="contentHeadlineR" /> </div> <div id="contentTR" /> <div id="clear" /> </div> <div id="contentM"> <xsl:value-of select="articleText" disable-output-escaping="yes" /> </div> <div id="contentB"> <div id="contentBL" /> <div id="contentBR" /> <div id="clear" /> </div> <div id="clear" /> </div> <br /></xsl:for-each>
on all other pages the Headline is within the "contentHeadlinetxt" and the content is located within the "contentM"
But with the macro listed above everything is nested within the ContentB and the formatting is all wrong.
Is this a known issue. Ive been troubleshooting for 4 hours now and have found NO errors in my html.
I find that in xslt if there is no content returned by XSLt it doesnt close off the tags correctly and there fore creates nested elements.
Perhaps just do an if statement to ensure that the content exists before making the call.
Hope this helps
I think it's to do with self closing tags, for empty divs, took me a while to figure this one out.
Where you have xsl:output method="xml" change it to:
<xsl:output method="html" omit-xml-declaration="yes"/>
see if that helps :)
Being new at all this i had some trouble... thanks Ian!
It worked like a charm!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted