SP2007 Using a Links List, I want to:
- Convert to DVWP
- Change layout to dropdown
- Enable list items to direct/redirect user to url of the selected list item
Numbers 1 and 2 are cake. Been there, done that.
Number 3 however is not. When converting the DVWP to a dropdown layout, the links (urls) lose the url. They no longer work. Nothing redirects the user.
So now I have this:
<xsl:template name="dvt_1">
<xsl:variable name="dvt_StyleName">Drpdwn</xsl:variable>
<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row" />
<select name="ID" size="1">
<option selected="true" value="0">Choose One...</option>
<xsl:call-template name="dvt_1.body">
<xsl:with-param name="Rows" select="$Rows" />
</xsl:call-template>
</select>
</xsl:template>
<xsl:template name="dvt_1.body">
<xsl:param name="Rows" />
<xsl:for-each select="$Rows">
<xsl:call-template name="dvt_1.rowview" />
</xsl:for-each>
</xsl:template>
<xsl:template name="dvt_1.rowview">
<option>
<a href="{substring-before(@URL, ', ')}">
<xsl:value-of select="substring-after(@URL, ', ')" />
</a>
</option>
</xsl:template>
I have tried several things but nothing seems to work. And since I don't know much about code, I could have been real close to getting it done, just wasn't sure what to look for or change.
Can someone help?