Solved

Sharepoint designer, XSL, create URL from list column data

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

685 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