Solved

SharePoint XSL Editor

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Javascript Hashmap output 8 46
Need to click button twice to get results 2 33
JavaScript: Issue with onClick 5 36
how to avoid redundand ajax calls 5 9
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

895 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

15 Experts available now in Live!

Get 1:1 Help Now