Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

SharePoint List LVWP - XSL help needed - Clicking on Link should take to the URL directly (instead of taking to item details)

$
0
0

Hi there

I have an LVWP on our home page that calls data from a list. When I click on a list item in LVWP it takes me to item details - which is normal behavior of SharePoint lists.

However I need to change this so clicking on the list item (in LVWP) takes me to the URL give in URL field in list.

The XSL that I am trying with is as follows:

Help will be greatly appreciated. Thanks so much.

<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 msxsl ddwrt"
 xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
 xmlns:asp="http://schemas.microsoft.com/ASPNET/20"
 xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:msxsl="urn:schemas-microsoft-com:xslt"
 xmlns:SharePoint="Microsoft.SharePoint.WebControls"
 xmlns:ddwrt2="urn:frontpage:internal"><xsl:import href="/_layouts/xsl/main.xsl"/><xsl:output method="html" indent="no"/><!--Created template to fetch all items from the list --><!-- Start --><xsl:template match="/"  xmlns:x="http://www.w3.org/2001/XMLSchema"><xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row" /><!-- <table class="myTable"> --><div class="box"><xsl:for-each select="$Rows"><xsl:call-template name="dvt_1.rowview" /></xsl:for-each></div><!--</table>--></xsl:template><!-- End --><!-- Actual Data to be shown from here --><!-- Start --><xsl:template name="dvt_1.rowview"><p>  <a href="/Lists/NewStory/DispForm.aspx?id={@ID}" target="_blank"><xsl:value-of select="@Title" /></a></p></xsl:template><!-- End --></xsl:stylesheet><!-- End -->



Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>