That depends. Which version are you running? 4.5 or 4.5.X?
If you are usign v4.5 the above code should actually work if the item with id 1092 is of the type "Folder", and you want to display items of the type "Image" from inside that folder. (I just tried this and it worked)
The code would work because there was a small bug in the XML schema in v4.5.
If you are using v4.5.X I'm quite sure that you can change your for-each to this:
<xsl:for-eachselect="$mediaItems/Image">
Haven't tested it though, but try giving it a shot. Otherwise it's a good idea to wrap your $mediaItems inside a textarea, to see the XML that your are working with like this:
Yes it s solved. I was so sute that the umbracosettings.config was right since this was a fresh installation. I have no clue how an old version could have been uploaded.
Looping images with new schema
Hi!
Im trying to loop images in a folder to display with jquery.cycle but its not working.
What is the problem?
Hi froad
That depends. Which version are you running? 4.5 or 4.5.X?
If you are usign v4.5 the above code should actually work if the item with id 1092 is of the type "Folder", and you want to display items of the type "Image" from inside that folder. (I just tried this and it worked)
The code would work because there was a small bug in the XML schema in v4.5.
If you are using v4.5.X I'm quite sure that you can change your for-each to this:
Haven't tested it though, but try giving it a shot. Otherwise it's a good idea to wrap your $mediaItems inside a textarea, to see the XML that your are working with like this:
/Kim A
Okay, I have just tested the code I posted before, and it does work. So by changing your for-each to this:
You should get a nice set of images - if you do work with v4.5.1 or v4.5.2 :)
/Kim A
That sounds all logical but I STILL doesnt get the for-each to trigger.
The xml looks like this :
Thx for taking your time!
Im using 4.5.2 by the way.
I'm using this to loop through all images in a folder in the media section:
Hi again froad.
The XML that you provided above is not the new schema. That's the old one from v4.
If you are using the old XML schema, you need to change the XSLT.
Try something like this:
/Kim A
I noticed that the UmbracoSettings file was incorrect!
Of some reason that was an old version. I updated the file and for a moment the whole website went beserk :)
Txh for all your help!
Hopefully things will work better now :)
One more thing..
I updated my Topnavigation xslt and now my topmenu doesnt work...
Okay so the problem about the looping through the images is solved now?
About your top navigation, try changing all the places where you have this:
to this:
*[@isDoc]
In exaple change this:
./node [string(umbracoNaviHide) != '1']
to this:
./*[@isDoc][string(umbracoNaviHide) != '1']
In the new XML schema, there are no tags called <node>, like in the old schema, so this is probably why your navigation doesn't work.
/Kim A
Yes it s solved. I was so sute that the umbracosettings.config was right since this was a fresh installation. I have no clue how an old version could have been uploaded.
Thank you sooo much for your help!
You are very welcome froad. Have a nice weekend :)
/Kim A
is working on a reply...