Hi i have created a some properties within a document type a media picker, a textstring and a richtext property.
slide1image = media picker
slide1hyperlink = textstring
slide1caption = rich text.
so
in html the slider looks like this
<div id="slider" class="nivoSlider"> <a href="#"><img src="img/vision-feature1.jpg" alt="vision-feature1" title="This is an example of a caption one" /></a> <a href="#"><img src="img/vision-feature2.jpg" alt="vision-feature2" title="This is an slide 2 of a caption " /></a> <a href="#"><img src="img/vision-feature1.jpg" alt="vision-feature1" title="#htmlcaption"/></a> </div>
so i wrote some inline xslt to see below which gets the img src section for each slide but also wrapped around the href pulling the url from the content (textstring)
<umbraco:Item runat="server" field="slide1image" xslt="concat('<img src="',umbraco.library:GetMedia({0}, true())/umbracoFile, '" alt=" alt text here " title=" caption text " />')" xsltDisableEscaping="true"/></a>
My problem is this the caption which is displayed in each slide is held within the richtext property but is fetched using the title of the img tag (see html).
How do i add the umbrao item (slide1caption)to the inline code adding the page field property to the xslt within the title property.
<umbraco:Item runat="server" field="slide1image" xslt="concat('<img src="',umbraco.library:GetMedia({0}, true())/umbracoFile, '" alt=" alt text here " title="1caption property slide " />')" xsltDisableEscaping="true"/></a
Any help would be appreciated, i have tried to use getitem but it failed, probably due to syntax.
Woud you not be better to have the caption field a textfield / textfield multiple. If it is a simple peice of text this will ensure it is just text - no html formatting as per a rich text editor.
help with inline XSLT for a jQuery slider
Hi i have created a some properties within a document type a media picker, a textstring and a richtext property.
slide1image = media picker
slide1hyperlink = textstring
slide1caption = rich text.
so
in html the slider looks like this
so i wrote some inline xslt to see below which gets the img src section for each slide but also wrapped around the href pulling the url from the content (textstring)
My problem is this the caption which is displayed in each slide is held within the richtext property but is fetched using the title of the img tag (see html).
How do i add the umbrao item (slide1caption)to the inline code adding the page field property to the xslt within the title property.
Any help would be appreciated, i have tried to use getitem but it failed, probably due to syntax.
Regards
Neil.
Hi Neil
Woud you not be better to have the caption field a textfield / textfield multiple. If it is a simple peice of text this will ensure it is just text - no html formatting as per a rich text editor.
Then I would assume it would be a case of :
Cheers
Nigel
The problemis that the caption is held as part of the image tag
namely the title,as below
Sorry but I do not fully understand the issue.
Personally I would be writing a simple XSLT for the output, and either calling it multiple times or using the variable '$currentPage' if possible.
In my opinion this would prove easier to debug as the output html is more clearly defined, etc.
Nigel
I think you should use excelent XSLT Macro Engine http://www.screenr.com/Rf9 and you can write multiline inline xslt, which can solve your problem.
Otherwise you can use something like this:
Petr
is working on a reply...