Solved

Sharepoint designer, XSL, create URL from list column data

Posted on 2013-02-04
3
628 Views
Last Modified: 2013-02-04
HI,

Hopefully a simple one for someone who has done it before, I havent :P

I have a dataview web part on a page and one of the columns shows...

<td class="ms-vb">
      <xsl:value-of select="@Project_x0020_Name"/>
</td>

This simply outputs the textual display of the Project name in the column of the DVWP.

I have a seperate SharePoint site for each project located at:-

http://servername/sites/project%20name

How can i use an xsl translation so that the column of the web browser contains a link to the site, built up from the contents of the @Project_x0020_Name ?

Hope that makes sense.

Neilsr
0
Comment
Question by:Neil Russell
  • 2
3 Comments
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
ID: 38850599
<td class="ms-vb">
      <a href="http://servername/sites/{@Project_x0020_Name}">
           <xsl:value-of select="@Project_x0020_Name"/>
     </a>
</td>

I just dumped the attribute value there, you use the terminology "built up", so you might need more, but you have access to all XPath functionality (even the ddrw functions) inside the {}
0
 
LVL 37

Author Closing Comment

by:Neil Russell
ID: 38850609
Easy when you know how! Thank you.
0
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 38850612
welcome
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now