Solved

SharePoint XSL Editor

Posted on 2013-01-29
3
743 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 50
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 (Microsoft MVP / EE MVE) 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
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 style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

707 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