Does the xslt save or is the error on front end? If its only on front end can you tag the page with querystring param ?umbDebugShowTrace=true then paste the error at from the trace it will give a bit more meaning.
Also 2 more things
<xsl:variablename="media"select="umbraco.library:GetMedia($currentPage/bannerImage, 0)"/> shouldnt that be <xsl:variablename="media"select="umbraco.library:GetMedia($currentPage/bannerImage, true())"/>
*edit* i think i was too slow to remove the first code i pasted. The property i use a mediaPicker on to select the folder is called bannerImage, not "media".
Heading home now. Will try it out tonight. I'm such a geezer when it comes to xslt so i'm quite sure it's some little mistake that ruins it all for me :(
images from folder 4.5 schema
So..
i've read the topics on here about selecting images from a folder i umbraco 4.5.1 running the new xml schema.
I found this guide at the bottom on the following page:
http://our.umbraco.org/wiki/reference/xslt/45-xml-schema/xslt-examples-updated-to-new-schema
Unfortunately it gives me an xslt error.
So how is it done?
Martin,
What exactly is the error? Is the error when you try to save the macro? Also can you paste your complete xslt.
I recently had issue my code looks like
This works.
Regards
Ismail
Hi Ismail
The whole xslt looks like this:
The error is: Error reading XSLT file: \xslt\FrontpageBanner.xslt
Martin,
Does the xslt save or is the error on front end? If its only on front end can you tag the page with querystring param ?umbDebugShowTrace=true then paste the error at from the trace it will give a bit more meaning.
Also 2 more things
Regards
Ismail
Hi Ismail
Thanks for your reply. Here's my current xslt:
And here's the trace error:
XSLT-kompileringsfejl.
ved System.Xml.Xsl.Xslt.XsltLoader.LoadStylesheet(XmlReader reader, Boolean include)
ved System.Xml.Xsl.Xslt.XsltLoader.Load(Compiler compiler, Object stylesheet, XmlResolver xmlResolver)
ved System.Xml.Xsl.Xslt.Compiler.Compile(Object stylesheet, XmlResolver xmlResolver, QilExpression& qil)
ved System.Xml.Xsl.XslCompiledTransform.CompileXsltToQil(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
ved System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
ved System.Xml.Xsl.XslCompiledTransform.Load(XmlReader stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
ved umbraco.macro.CreateXsltTransform(XmlTextReader xslReader, Boolean debugMode)
ved umbraco.macro.getXslt(String XsltFile)
ved umbraco.macro.loadMacroXSLT(macro macro, Hashtable attributes, Hashtable pageElements)
Front end error
*edit* i think i was too slow to remove the first code i pasted. The property i use a mediaPicker on to select the folder is called bannerImage, not "media".
Sorry
Ok, i already got confused now, lol :-)
All i want to know is how i get the images in a folder through the mediaPicker with 4.5 schema with the propertyAlias being "bannerImage"
All help is much appreciated.
i think primarily your issue is what you are setting $media equal to....
should do the trick, right? you are just getting the MediaID to then use for your getMedia() for-each loop below.
Hi Bob
Heading home now. Will try it out tonight. I'm such a geezer when it comes to xslt so i'm quite sure it's some little mistake that ruins it all for me :(
Hi Bob
You're sort of the answer to all my trouble.
1. I suck at xslt
2. You're suggestion got me hunting and i ended with the following, with the help from another thread also:
is working on a reply...