Solved

Sharepoint designer, XSL, create URL from list column data

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

839 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