News Ticker

A

adam bob

Hello,

I found a useful piece of XSL which enables you to create a ticker
based on a list. Currently i can only display the Title. Is there a
way i can display more than one column, i'm sure there is, i need to
display two further columns from my list. this is the current XSL;


<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema"
xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0"
exclude-result-prefixes="xsl ddwrt msxsl" xmlns:ddwrt="http://
schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://
www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-
com:xslt">
<xsl:eek:utput method="html" indent="no"/>
<xsl:param name="dvt_adhocmode"></xsl:param>
<xsl:param name="dvt_adhocfiltermode">xsl</xsl:param>
<xsl:param name="dvt_fieldsort"></xsl:param>
<xsl:param name="dvt_sortfield"></xsl:param>
<xsl:param name="dvt_groupfield"></xsl:param>
<xsl:param name="dvt_groupdisplay"></xsl:param>
<xsl:param name="dvt_sortdir"></xsl:param>
<xsl:param name="dvt_groupdir"></xsl:param>
<xsl:param name="dvt_grouptype"></xsl:param>
<xsl:param name="dvt_sorttype">text</xsl:param>
<xsl:param name="dvt_groupsorttype">text</xsl:param>
<xsl:param name="dvt_filterfield"></xsl:param>
<xsl:param name="dvt_filterval"></xsl:param>
<xsl:param name="dvt_filtertype"></xsl:param>
<xsl:param name="dvt_firstrow">1</xsl:param>
<xsl:param name="dvt_nextpagedata"></xsl:param>
<xsl:param name="dvt_apos">'</xsl:param>
<xsl:param name="filterParam"></xsl:param>
<xsl:template match="/" xmlns:x="http://www.w3.org/2001/
XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp">
<xsl:call-template name="dvt_1"/>
</xsl:template>
<xsl:template name="dvt_1">
<xsl:variable name="StyleName">Table</xsl:variable>
<xsl:variable name="Rows" select="/dsQueryResponse/Rows/
Row"/>
<xsl:variable name="RowCount" select="count($Rows)"/>
<xsl:variable name="IsEmpty" select="$RowCount = 0"/>
<xsl:choose>
<xsl:when test="$IsEmpty">
<xsl:call-template name="dvt_1.empty"/>
</xsl:when>
<xsl:eek:therwise>
<table border="0" width="100%" cellpadding="2"
cellspacing="0" class="ms-nav">
<tr>
said:
<xsl:with-param name="FirstRow" select="1"/><xsl:with-param
name="LastRow" select="$RowCount"/></xsl:call-template></marquee></td>
</tr>
</table>
</xsl:eek:therwise>
</xsl:choose>
</xsl:template>
<xsl:template name="dvt_1.body">
<xsl:param name="Rows"/>
<xsl:param name="FirstRow"/>
<xsl:param name="LastRow"/>
<xsl:variable name="GroupStyle" select="'auto'"/>
<xsl:for-each select="$Rows">
<img src="_layouts/images/navlink.gif" border="0"/>
<img src="_layouts/images/blank.gif" height="1"
width="10" alt="Icon" border="0"/>
<a style="display:{$GroupStyle}">
<xsl:attribute name="href">Lists/Scrolling%20List/
DispForm.aspx?ID=<xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/
Transform" select="@ID"/></xsl:attribute>
<font>
<xsl:attribute name="size"><xsl:value-of
select="@Font_x0020_Size"/></xsl:attribute>
<xsl:attribute name="style">
<xsl:if test="@Bold &gt; 0">font-weight:Bold;</xsl:if>
<xsl:if test="@Italics &gt; 0">font-style:Italic;</xsl:if>
</xsl:attribute>
<xsl:attribute name="color">
<xsl:value-of select="@Color"/>
</xsl:attribute>
<xsl:value-of select="@Title"/>
</font>
</a>
<img src="_layouts/images/blank.gif" height="1"
width="20" alt="Icon" border="0"/>
</xsl:for-each>
</xsl:template>
<xsl:template name="dvt_1.empty">
<xsl:variable name="ViewEmptyText">There are no current
announcements.</xsl:variable>
<table border="0" width="100%">
<tr>
<td class="ms-vb"><xsl:value-of
select="$ViewEmptyText"/></td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>


Many thanks

Adam
 
P

Pavel Lepin

adam bob said:
I found a useful piece of XSL which enables you to create
a ticker based on a list. Currently i can only display the
Title. Is there a way i can display more than one column,
i'm sure there is, i need to display two further columns
from my list. this is the current XSL;

[snip stylesheet]

http://catb.org/~esr/faqs/smart-questions.html

Your stylesheet is several pages long, poorly formatted,
full of 0xa0's, contains a lot of stuff irrelevant to your
predicament and lacks a sample input document.
 
A

adam bob

I found a useful piece of XSL which enables you to create
a ticker based on a list. Currently i can only display the
Title. Is there a way i can display more than one column,
i'm sure there is, i need to display two further columns
from my list. this is the current XSL;

[snip stylesheet]

http://catb.org/~esr/faqs/smart-questions.html

Your stylesheet is several pages long, poorly formatted,
full of 0xa0's, contains a lot of stuff irrelevant to your
predicament and lacks a sample input document.

thanks for the help, VERY useful
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top