Show newslist on every node, included on newsarticles.
Hello!
I ran into this roadblock today: I am making a website that will always have a newslist on the left side of the page. I installed the Runway News Library as a start and it's working well.
This is how it looks now: Newslist on homepage looks like this: - Newsarticle 1 -Newsarticle 2 - Newsarticle 3
Newslist on any of the newsarticle looks like this: - Newsarticle ( this is the article I am browsing )
I would like all the newsitem to show on newspages aswell, and not only the active like it does now. The macro is in Mastertemplate and imo I don't think it's there since it always show the active newsarticle. My guess, it's something missing from the xslt, but I am not sure what and where it should go.
Anyone got any idea what will fix this? ;)
Information: umbraco v
4.0.2.1 (Assembly version: 1.0.3441.17657) SQL Server 2008 Windows Server 2008 SP2 64-bit IIS7
Best Regards, Fredrik K
Here is the RunwayNewsLibrary.xslt code (Sorry for long code, I chopped off some pieces so it wouldn't be so long)
<!-- The Newspages to repeat over --> <xsl:variable name="documents" select="$currentPage/descendant-or-self::node [@nodeTypeAlias = 'RunwayNewspage']" />
<!-- Number of characters to display in the preview --> <xsl:variable name="numCharsPreview"> <xsl:choose> <xsl:when test="$currentPage/ancestor-or-self::node [@nodeTypeAlias = 'RunwayNewsLibrary']/data [@alias = 'numPreviewChars'] != '' and number($currentPage/ancestor-or-self::node [@nodeTypeAlias = 'RunwayNewsLibrary']/data [@alias = 'numPreviewChars']) != 'NaN'"> <xsl:value-of select="$currentPage/ancestor-or-self::node [@nodeTypeAlias = 'RunwayNewsLibrary']/data [@alias = 'numPreviewChars']"/> </xsl:when> <xsl:when test="string(/macro/numCharsPreview) != ''"> <xsl:value-of select="/macro/numCharsPreview"/> </xsl:when> <xsl:otherwise>66</xsl:otherwise> </xsl:choose> </xsl:variable>
<!-- Text to display if there are no items --> <xsl:variable name="newsNoItems"> <xsl:choose> <xsl:when test="umbraco.library:GetDictionaryItem('NewsNoItems') != ''"> <xsl:value-of select="umbraco.library:GetDictionaryItem('NewsNoItems')"/> </xsl:when> <xsl:otherwise> <xsl:text></xsl:text> </xsl:otherwise> </xsl:choose> </xsl:variable>
<!-- Renders the list of pages --> <xsl:template name="RenderPageLinks"> <xsl:param name="numPages"/> <xsl:param name="page"/> <xsl:param name="current"/>
Show newslist on every node, included on newsarticles.
Hello!
I ran into this roadblock today:
I am making a website that will always have a newslist on the left side of the page. I installed the Runway News Library as a start and it's working well.
This is how it looks now:
Newslist on homepage looks like this:
- Newsarticle 1
-Newsarticle 2
- Newsarticle 3
Newslist on any of the newsarticle looks like this:
- Newsarticle ( this is the article I am browsing )
I would like all the newsitem to show on newspages aswell, and not only the active like it does now.
The macro is in Mastertemplate and imo I don't think it's there since it always show the active newsarticle.
My guess, it's something missing from the xslt, but I am not sure what and where it should go.
Anyone got any idea what will fix this? ;)
Information:
umbraco v 4.0.2.1 (Assembly version: 1.0.3441.17657)
SQL Server 2008
Windows Server 2008 SP2 64-bit
IIS7
Best Regards,
Fredrik K
Here is the RunwayNewsLibrary.xslt code (Sorry for long code, I chopped off some pieces so it wouldn't be so long)
is working on a reply...