Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a site in which there is a library named "Pages". This is the standard library where all pages that you create comes.

Using XSL, I am trying to display page links on my home page. Problem is except "Modified" field, none of the fields are being displayed.

So basically doing the following in my XSL works i.e. Modified date is displayed.

<xsl:value-of select="@Modified">

But other than that none of the fields are being displayed. So for e.g. if I do this:

<xsl:value-of select="@Title">
<xsl:value-of select="@Name">
<xsl:value-of select="@Contact">

They are not being displayed even though these fields exists.

Any reason why is that?

Secondly I want to know how can I display URL of page? Something like following which will give me URL of the page.

<xsl:value-of select="@URL">
share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

XSL will only display the fields that are included in the view so make sure you have those columns added.

To get the URL try:

<xsl:value-of select="@FileRef">

Also instead of Name try:

<xsl:value-of select="@FileLeafRef">

If I am unsure of the internal names of columns I often create myself a view in SPD and then check the details of the data source.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.