Help tidying up and fixing errors with a List Rotator
I hope the help i need is simple enough, but im still green with xstl and umbraco, and this is quite the project ive been hired to help with, so please forgive me for asking for help all the time.
Its relativly simple, just requires some explanation.
At first it just displayed items hardcoded into an xstl, which worked fine (i can show you that if anyone wants to, shows its structure before i messed with it).
The point of it is, the main document every document inherits from, has two boolean properties, one is if should be listed in the rotator on the main front page, or if it should be listed on the rotator in its respective sub-section.
After i modified it, it looks for ALL articles (documents) that has just one of the boolean properties set to true and lists them (with this, it shows all the articles thats supposed to be featured on the frontpage, even in the sub-sections) It also shows the articles picture in the list, but NOT in the background when its selected. Text works also and linking.
<!-- start writing XSLT --> <div class="g640p10 none"> <div class="container"> <div class="l-rotator"> <div class="screen"> <noscript> <!-- when javascript is off --> <p>Javascript er ikke slÄet til.</p> </noscript> </div> <div class="thumbnails"> <ul> <!--
"articleFontpageLink" is a document template boolean property, checks
if its true. Decides wether it should be listed or not--> <xsl:for-each select="$currentPage/descendant::*[@isDoc][not(umbracoNaviHide = 1)][string(articleFrontpageLink) = '1']"> <li> <div class="thumb"> <!-- Thumbnail for listed item --> <xsl:if test="count(current()/outputPictures) > 0"> <img src="/ImageGen.ashx?image={current()/outputPictures[position()=1]/DAMP[@fullMedia]/mediaItem/Image/umbracoFile}&width=64&height=64"/> </xsl:if> <p> <span class="title"> <xsl:value-of select="@nodeName"/> </span> <br/> <!-- Text from listed item, to appear in the list itself --> <!-- <xsl:value-of select="umbraco.library:TruncateString(artikel-Teasertekst,70,'...')"/> --> </p> </div> <!-- Background image for highlighted item--> <a href="/ImageGen.ashx?image={DAMP[@fullMedia]/mediaItem/Image/umbracoFile}&width=600&height=300"><xsl:value-of select="normalize-space('')"/></a> <a href="{umbraco.library:NiceUrl(@id)}"><xsl:value-of select="normalize-space('')"/></a> <div style="top:5px; left:5px; width:325px; height:0;"> <h1><xsl:value-of select="@nodeName"/></h1> <!-- Text excerpt from article--> <xsl:value-of select="umbraco.library:TruncateString(article-Manchet,160,'...')"/> </div> </li> </xsl:for-each> </ul> </div> </div> <!-- End .l-rotator --> </div> <!-- End .container --> </div> <!-- End g640p10 -->
</xsl:template> <!-- Template for thumbnail image, currently not in use --> <xsl:template match="outputPictures"> <img src="/ImageGen.ashx?image={DAMP[@fullMedia]/mediaItem/Image/umbracoFile}&width=600&height=300"/> </xsl:template>
</xsl:stylesheet>
Ive tried to make sensible code comments. The template in the bottom is me trying to tidy up the code but not succesful so far.
I really hope the wall of text didnt scare anyone away, i hope the help i need is easy enough, as it stems from me not knowing enough. If any questions or other information is needed i will reply ASAP.
Help tidying up and fixing errors with a List Rotator
I hope the help i need is simple enough, but im still green with xstl and umbraco, and this is quite the project ive been hired to help with, so please forgive me for asking for help all the time.
Its relativly simple, just requires some explanation.
The main page of the site im working on, has a rotator that showcases featured articles.
This is the one we are using: http://codecanyon.net/item/jquery-list-style-rotator/133870
At first it just displayed items hardcoded into an xstl, which worked fine (i can show you that if anyone wants to, shows its structure before i messed with it).
The point of it is, the main document every document inherits from, has two boolean properties, one is if should be listed in the rotator on the main front page, or if it should be listed on the rotator in its respective sub-section.
After i modified it, it looks for ALL articles (documents) that has just one of the boolean properties set to true and lists them (with this, it shows all the articles thats supposed to be featured on the frontpage, even in the sub-sections)
It also shows the articles picture in the list, but NOT in the background when its selected. Text works also and linking.
Ive tried to make sensible code comments.
The template in the bottom is me trying to tidy up the code but not succesful so far.
I really hope the wall of text didnt scare anyone away, i hope the help i need is easy enough, as it stems from me not knowing enough. If any questions or other information is needed i will reply ASAP.
is working on a reply...