Solved

SharePoint XSL Editor

Posted on 2013-01-29
3
707 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

803 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