Solved

Sharepoint designer, XSL, create URL from list column data

Posted on 2013-02-04
3
647 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

786 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