Solved

SharePoint XSL Editor

Posted on 2013-01-29
3
677 Views
Last Modified: 2013-01-30
Hi experts!

I have a XSL tag and I added a parameter behind the URL.

I did so and there is an error.

<xsl:when test="@ContentType='Process'">
<a href="http://k1.zone1.company.net/sites/sg/k1_sg/Pro/Forms/DispForm.aspx?ID={@ID}&Source=http://k1.zone1.company.net/sites/sg/k1_sg/Pro/Forms/AllItems.aspx">
<xsl:value-of select="@FileLeafRef"/>
</a>
 </xsl:when>
                           

I added - &Source=http://k1.zone1.company.net/sites/sg/k1_sg/Pro/Forms/AllItems.aspx


Please advise.
0
Comment
Question by:sharepoint2013
  • 2
3 Comments
 
LVL 50

Expert Comment

by:teylyn
Comment Utility
Hello,

If you have verified that the URL works when you manually type it in, then it is probably the & sign in the address that's the problem. Try replacing the & sign with the text

&amp;

The & sign has special meaning in the XSL and introduces a special character, like

&nbsp;  -- non breaking space
&quot;  -- a double quote
&lt;  -- the lesser than sign <
&amp; -- the ampersand sign.

cheers, teylyn
0
 

Author Comment

by:sharepoint2013
Comment Utility
What I'm saying is, I need to add this source and also need to ensure it is the max size window opened in new.


So it's

&amp;Source=http://k1.zone1.company.net/sites/sg/k1_sg/Pro/Forms/AllItems.aspx"

is this correct?
0
 
LVL 50

Accepted Solution

by:
teylyn earned 500 total points
Comment Utility
I said to replace the & sign with

&amp;

So the code would be

<xsl:when test="@ContentType='Process'">
<a href="http://k1.zone1.company.net/sites/sg/k1_sg/Pro/Forms/DispForm.aspx?ID={@ID}&amp;Source=http://k1.zone1.company.net/sites/sg/k1_sg/Pro/Forms/AllItems.aspx">
<xsl:value-of select="@FileLeafRef"/>
</a>
 </xsl:when>

I have no idea what that link will do. The syntax does not make much sense to me. Why are you adding the address of a list view as a parameter when you open a list item in the display form?

Therefore, please first confirm that the link you are creating is actually doing what you want it to do: in your web browser, enter this link manually (or copy and paste from here):

http://k1.zone1.company.net/sites/sg/k1_sg/Pro/Forms/DispForm.aspx?ID=1&Source=http://k1.zone1.company.net/sites/sg/k1_sg/Pro/Forms/AllItems.aspx

This is for the list item with ID number 1. Please replace it with another item ID if 1 is not a suitable item ID for the test.

Please don't tack on additional questions.
>>  and also need to ensure it is the max size window opened in new.

That has nothing to do with your question about the parameter.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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, …
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now