Solved

SharePoint XSL Editor

Posted on 2013-01-29
3
716 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:Ingeborg Hawighorst
ID: 38834168
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
ID: 38834273
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:
Ingeborg Hawighorst earned 500 total points
ID: 38834354
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

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

Suggested Solutions

Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
These days socially coordinated efforts have turned into a critical requirement for enterprises.
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.…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

856 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