ATM I’m having two issues.
And I think it would help to describe the page structure first.
Company -Language -Home -About Us -Contact -Ect -Language -Home -.......
The issues are
1.At the Language node I determine the icon/image and where it should link.
But i need this to be recursive, since the menu should remain the same on the
subpages.
But it should be customizable within each Language node.
2.Also the link at my img doesn’t work. The href doesn’t refer to anything
but the line of code actually.
You have to replace "language" with the documenttype alias of the language node. The variable above will look for ancestor-or-self of type "language", which is a document and not a property [@isDoc]
And create two variables more, one for the href and one for the img:
And please remember to create some cool title- and alt-tags for the image and link. You could add these properties at the language-node and get them like "Img" and "Link"... :)
If you're looking for a media picker with some extra features I've created the Digibiz Advanced Media Picker in which you can do a lot more! You can find a sample on how to use it here: http://screenr.com/TEY.
Thanks for the Berntsen. Your post was a great help, but it still dosnt fetch the data from the parent page. I'm gonna do some troubleshooting later today and see if i can get it fixed.
Im have my studys this week end got some papers to write, so got off work. But ill spend my evenings figuring this out. And i will reply the second i get some new information.
Regarding errors i get none, i saved the XLTS with no problems.
I added a paragraph to the If sentence, saying "test" and it did not show, so i figured that it dosnt read any data.
Ill try and fix it this Friday at the latest.
Also i borrowed a book from my former teacher regarding XML and XLTS programming.
Mediapicker & Contentpicker menu issue / help
ATM I’m having two issues.
And I think it would help to describe the page structure first.
Company
-Language
-Home
-About Us
-Contact
-Ect
-Language
-Home
-.......
The issues are
1. At the Language node I determine the icon/image and where it should link. But i need this to be recursive, since the menu should remain the same on the subpages.
But it should be customizable within each Language node.
2. Also the link at my img doesn’t work. The href doesn’t refer to anything but the line of code actually.
The code:
I realize that i should use $currentPage/ancestor-or-self for the 1st issue
or am I wrong?
Thanks for the help
/mVingaard
Hi Martin,
First of all, are you running version 4.5+? Your XSLT seems to be a mix between the new and old schema... :)
Ancestor-or-self would be the way to get the property recursively.
Yeh I’m running 4.6.1 to be precise
It’s my first large project in Umbraco so I’m kind of learning as i go :)
Allot of the guides online are from the old XSLT so gotta confess, I get confused from time to time.
Shameless bump
Hi again,
What I would do is this:
Create a variable, call it data:
You have to replace "language" with the documenttype alias of the language node. The variable above will look for ancestor-or-self of type "language", which is a document and not a property [@isDoc]
And create two variables more, one for the href and one for the img:
The variables above uses the data-variable and therefore looks for the two properties at the "language" doc.
Now you should be able to do something like this:
The above code only work if: 1. "submenuImage01" is of type Media Picker and 2. "submenuLink01" is of type Content Picker. Try it out. :)
And please remember to create some cool title- and alt-tags for the image and link. You could add these properties at the language-node and get them like "Img" and "Link"... :)
Thanks for the reply :)
I will test it tonight or tomorrow at work.
Im pritty sure i understand the syntax now.
You could also take a look at this Wikipage, which explains the difference between the old and the new XML schema:
http://our.umbraco.org/wiki/reference/xslt/45-xml-schema
And some XSLT examples which show the difference:
http://our.umbraco.org/wiki/reference/xslt/45-xml-schema/xslt-examples-updated-to-new-schema
Good luck! And feel free to reply if it doesn't work...
If you're looking for a media picker with some extra features I've created the Digibiz Advanced Media Picker in which you can do a lot more! You can find a sample on how to use it here: http://screenr.com/TEY.
Jeroen
Thanks for the Berntsen. Your post was a great help, but it still dosnt fetch the data from the parent page.
I'm gonna do some troubleshooting later today and see if i can get it fixed.
Hi Martin,
Did you receive any kind of errors or did the data just not show?
Btw. "Thanks for the Berntsen" is a great typo... :D
haha. i was @ a tecture at school. Wasnt concentrating :P
I got no error while saving.
I added a <p>test</p> within the 'if' to see if it got any data. But the para. didnt show.
i just a hold of 'An introduction to XML and Web Technologies'... It should be a help.
I worked with C# prior to this, so it should be "easy" to master
Try to get the values from the two variables then:
<xsl:value-of select="$Img" />
and
<xsl:value-of select="$Link" />
Any luck?
Hi, sorry for the late reply.
Haha what a great typo :P
Im have my studys this week end got some papers to write, so got off work. But ill spend my evenings figuring this out. And i will reply the second i get some new information.
Regarding errors i get none, i saved the XLTS with no problems.
I added a paragraph to the If sentence, saying "test" and it did not show, so i figured that it dosnt read any data.
Ill try and fix it this Friday at the latest.
Also i borrowed a book from my former teacher regarding XML and XLTS programming.
Thanks
/Martin Vingaard
is working on a reply...