EDN Admin
Well-known member
I am editing an xsl file used to style a page in the Productivity Hub site in Sharepoint 2010.
I have the following:
/_layouts/WordViewer.aspx?id={@FileRef} <xsl:value-of select="@Title"/>
The problem with this is that not all of the files in the document library are .docx files. I need to conditionally change the web service reference based on the file extension specified in @FileRef.
@FileRef contains the name of the file that ends with either .xlsx, .docx, or .pptx (other extensions may also exist).
I need to parse the last 5 characters of @FileRef and conditionally place the following in the url:
.docx: /_layouts/WordViewer.aspx?id=<br/>
.xlsx: /_layouts/xlviewer.aspx?id=<br/>
.pptx: _layouts/PowerPoint.aspx?PowerPointView=ReadingView&PresentationId=
How would I go about accomplishing this?
<br/>
View the full article
I have the following:
/_layouts/WordViewer.aspx?id={@FileRef} <xsl:value-of select="@Title"/>
The problem with this is that not all of the files in the document library are .docx files. I need to conditionally change the web service reference based on the file extension specified in @FileRef.
@FileRef contains the name of the file that ends with either .xlsx, .docx, or .pptx (other extensions may also exist).
I need to parse the last 5 characters of @FileRef and conditionally place the following in the url:
.docx: /_layouts/WordViewer.aspx?id=<br/>
.xlsx: /_layouts/xlviewer.aspx?id=<br/>
.pptx: _layouts/PowerPoint.aspx?PowerPointView=ReadingView&PresentationId=
How would I go about accomplishing this?
<br/>
View the full article