What I plan is to create a folder within my media section for "Headerimages", where images that I wish to feautre in my slideshow above will be housed, properties will be assigned to these images such as "Image Title" "Description" "Link" to mirror my current hardcoded set up
How would I go about linking this image folder into my jQuery slideshow. Currently it is hardcoded in via HTML
<!-- images --> <div class="pics"> <div class="pics"> <img src="images/highlights_01.jpg" title="Online Enrolment" alt="You can now enrol on your preferred course online, without the need to get out the house." url="#1" width="610" /> <img src="images/highlights_01.jpg" title="Online Enrolment 2" alt="You can now enrol on your preferred course online, without the need to get out the house." url="#2" width="610" /> <img src="images/highlights_01.jpg" title="Online Enrolment 3" alt="You can now enrol on your preferred course online, without the need to get out the house." url="#3" width="610" /> <img src="images/highlights_01.jpg" title="Online Enrolment 4" alt="You can now enrol on your preferred course online, without the need to get out the house." url="#4" width="610" /> </div>
I assume it would be an XSLT query that would seelct a particuarly media note and display. My XSLT knowledge is poor, if anyone has written a script already that achives what I plan to do, would be great to have some advice.
Hi Mike thanks for the guidance, as I said my XSLT knowledge is not great, am receiving this error message
System.OverflowException: Value was either too large or too small for an Int32. at System.Convert.ToInt32(Double value) at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) at System.Xml.Xsl.Runtime.XmlQueryRuntime.ChangeTypeXsltArgument(XmlQueryType xmlType, Object value, Type destinationType) at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args) at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results) at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
I have named my MediaType - Headerimages, do I need to change the variable name to Headerimages? Also my macro is now called headerimages. Would anything need to change to reflect this in my XSLT.
Hi Mike, still not getting any joy (although error messages are now no longer displayed) web page just does not display no images This is my current HTML surrounding the area:-
Headerimages is the new mediatype I have created. Looking at my XSLT would I need to change the variable name which is currently MediaNodeId or is this irrelevent?
You need to add a paramater to your macro! called MediaNode, and set it's type as mediaCurrent... then when you insert the macro into the tempalte you will get a dialogue asking you to pick the folder from the media area where your images are contained.
Just encountered a small issue, i'd like to be able to return a NiceUrl rather than the NodeId I am currently receiving. Do you have idea how I would implement this in the above code. I'm guessing NiceUrl declaration needs to be wrapped around the URL in my XSLT but have been unable to work it out.
Just noticed a small issue with my image slideshow. URL links work great it seems at top level pages (http://www.ystrad-mynach.ac.uk/home) but at any child level pages (http://www.ystrad-mynach.ac.uk/the-college/about/) URL links are linking to current page.
I'm assuming i'm missing perhaps a '../' somewhere possible as it might be an absolute/relative link issue. Hoping you can solve my problem.
Creating a jQuery header image slideshow
Hi, had a looked through the forums if other's have implemented what I hope to achieve but couldnt find any answers.
I have a JQuery image header running on a test site at http://web3.ystrad-mynach.ac.uk/1950.aspx that is powered using a jQuery slideshow courtesy of http://jquery.malsup.com/cycle/anchor.html
What I plan is to create a folder within my media section for "Headerimages", where images that I wish to feautre in my slideshow above will be housed, properties will be assigned to these images such as "Image Title" "Description" "Link" to mirror my current hardcoded set up
How would I go about linking this image folder into my jQuery slideshow. Currently it is hardcoded in via HTML
I assume it would be an XSLT query that would seelct a particuarly media note and display. My XSLT knowledge is poor, if anyone has written a script already that achives what I plan to do, would be great to have some advice.
Many Thanks
Matt
http://our.umbraco.org/forum/using/ui-questions/23771-Advice-about-carousels
Similar to this...
Hi Mike, that's just what I needed, what you posted is just what I need.
I will likely go down the custom media type via a macro. From the code you posted on that thread
{!--macro param--}
<xsl:variable name="MediaNodeId"select="/macro/MediaNode/Folder/@id"/>
or
{!--doc param--}
<xsl:variable name="MediaNodeId"select="$currentPage/MediaNode/Folder/@id"/>
...
<xsl:for-each select="umbraco.library:GetMedia($MediaNodeId, 1)/{CUSTOMMEDIATYPE}">
...
xsl:for-each>
Would you have a compelte XSLT that you have created which you coud share?
P.S I somehow marked my reply as a solution (even though it isn't) lol!
Thanks
the xslt script that I have doesn't use jquery.malsup but a custom implementation on top of the jqueryUI framework...
looking at your html above... think this should be close to what you want... untested so may need some debugging....
Hi Mike thanks for the guidance, as I said my XSLT knowledge is not great, am receiving this error message
System.OverflowException: Value was either too large or too small for an Int32.
at System.Convert.ToInt32(Double value)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Xml.Xsl.Runtime.XmlQueryRuntime.ChangeTypeXsltArgument(XmlQueryType xmlType, Object value, Type destinationType)
at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args)
at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer)
at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results)
at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
I have edited your XSLT for my needs
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:variable name="MediaNodeId" select="/macro/MediaNode/Folder/@id"/>
<xsl:template match="/">
<xsl:value-of select="umbraco.library:RegisterJavaScriptFile('Malsup', 'js/jquery.cycle/jquery.cycle.all.min.js')"/>
<div class="pics">
<xsl:for-each select="umbraco.library:GetMedia($MediaNodeId, 1)/Headerimages">
<img src="{./umbracoFile}" title="{./title}" alt="{./description}" url="{./url}" width="{./width}" />
xsl:for-each>
div>
xsl:template>
xsl:stylesheet>
I have named my MediaType - Headerimages, do I need to change the variable name to Headerimages? Also my macro is now called headerimages. Would anything need to change to reflect this in my XSLT.
Thanks, Matt
ah, you may need a check for the mediaNode not being empty...
add an if around the for-each
Hi Mike, still not getting any joy (although error messages are now no longer displayed) web page just does not display no images This is my current HTML surrounding the area:-
This is my XSLT:-
Headerimages is the new mediatype I have created. Looking at my XSLT would I need to change the variable name which is currently MediaNodeId or is this irrelevent?
Your help is much appreciated.
Ok, you are missing the vital link....
You need to add a paramater to your macro! called MediaNode, and set it's type as mediaCurrent... then when you insert the macro into the tempalte you will get a dialogue asking you to pick the folder from the media area where your images are contained.
Mike,
That was it...! All working great. Many thanks for your help, clocking off in 20mins with a big smile on my face
Glad to help.
Hi Mike,
Just encountered a small issue, i'd like to be able to return a NiceUrl rather than the NodeId I am currently receiving. Do you have idea how I would implement this in the above code. I'm guessing NiceUrl declaration needs to be wrapped around the URL in my XSLT but have been unable to work it out.
I assume you mean ./url is giving you a node id?
if so then use the umbraco.library method NiceUrl
url="{umbraco.library:NiceUrl(./url)}"
That's perfect, many thanks, tried wrapping umbraco.library method NiceUrl a few ways but couldnt get it to work. Great stuff!
Hi Mike,
Just noticed a small issue with my image slideshow. URL links work great it seems at top level pages (http://www.ystrad-mynach.ac.uk/home) but at any child level pages (http://www.ystrad-mynach.ac.uk/the-college/about/) URL links are linking to current page.
I'm assuming i'm missing perhaps a '../' somewhere possible as it might be an absolute/relative link issue. Hoping you can solve my problem.
Many Thanks
Matt
is working on a reply...