Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I thought I would ask in the forum incase I am trying to re-invent the XSLT wheel and someone out there already knows the answer.
What I am trying to do is the following:
I have a page called: JOBS
And I am using URL Redirect which allows up to 4 parameters to be passed in the URL.
e.g. all the following should be valid URL's.
So, in other words all options are optional, but the second level locations or sub categories are only allowed if their parent is also there, so the following would never be valid:
What I am trying to do now is to find the nodes using XSLT, but of course the node names are not the same as above, as they have been URL encoded.
URL = south-east
nodeName = South East
So what is the most efficient XSLT way of searching for the south-east nodeID?
Thanks in advance for your help,
You could do a match on @urlName as opposed to @nodeName ?
Does that help you out Chris?
Your a life saver, I knew all I'd need was a gentle nudge :)
I'll post my final solution later :)
Yeh be interesting to see how you solved this problem with your final XSLT.
As promised in case someone else wants to do something similar, here is the XSLT code I used to find the area and counties.
To re-cap, I am using URL redirect to allow up to 4 parameters to be passed in a URL.
First pull the possible 4 variables from the query string:
Now search for the Area, which could be in the 1st,2nd or 3rd position:
And now a search for the Counties, which could be in the 2nd,3rd or 4th position:
If anyone has a better solution / shorter solution feel free to chip in your suggestions, but for now, it's working :) The site re-design has to be finished and going live on Monday, so the heat is on to get the rest finished :)
Thanks again Warren,
Hi Chris this was very helpful as I'm currently making a jobboard for surgical assistants in Australia (filter by state)
I originally tried doing it the other way, but got stuck trying to pass the nodeid into the macro - I put this directly in the template:
<script runat="server"><br />
public string setSource;<br />
protected void Page_Load(object sender, EventArgs e)<br />
if (Page.IsPostBack)<br />
setSource = this.StateDropDownList.SelectedValue;<br />
if (setSource != null)<br />
this.StateDropDownList.SelectedValue = "1115";<br />
public object value<br />
return setSource;<br />
setSource = value.ToString();<br />
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted