At the moment I am getting the line break characters '\r\n' in the description string with output escaping on or off and I get no path for the image file however the image object is present since if I output $Image I get the string of data associated with the image.
Am I missing something really obvious or just having a dumb day?
Thanks Dirk however it seems a bit extreme as I am guessing this will turn Tidy off across the site, I'm wondering if there is another way of implementing what I am trying to achieve?
Removing the space after $Image had no effect - this is a strange one!
paramname and mediaCurrentAlias should be changed to your xslt parameter and macro paramater alias of course
[/quote]
The problem is that this replaces all the line breaks with . There were no line breaks in the original copy it is the multi-line textbox that is assuming line breaks when it reaches the end of the line.
[quote=ddrayne]should add, it's helpful to use to see the xml being returned from a given query, it helps to use this to construct the right xpath
Also, for linebreaks in textboxes you can use
[code]
[/code][/quote]
The problem is that this replaces all the line breaks with . There were no line breaks in the original copy it is the multi-line textbox that is assuming line breaks when it reaches the end of the line
Problems using a Macro for Content Template
I am building a macro for the purposes of allowing editors to input preformatted content into a site but I am having a few issues.
The macro accepts 3 params:
1. Description(textMultiLine)
2. Image(mediaCurrent)
3. ContentNode (contentPicker)
My XSLT at the moment is as follows and really only for testing purpose:
[code]
]>
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library"
exclude-result-prefixes="msxml umbraco.library">
[/code]
At the moment I am getting the line break characters '\r\n' in the description string with output escaping on or off and I get no path for the image file however the image object is present since if I output $Image I get the string of data associated with the image.
Am I missing something really obvious or just having a dumb day?
Hi,
Seen this post? http://forum.umbraco.org/yafpostst8317Linebreaks-appear-in-parameters.aspx
Might be the solution to the multiline parameter issue.
As for the image stuff, would it help not to have a space between $Image and '/'?
Hope this helps.
Regards,
/Dirk
Thanks Dirk however it seems a bit extreme as I am guessing this will turn Tidy off across the site, I'm wondering if there is another way of implementing what I am trying to achieve?
Removing the space after $Image had no effect - this is a strange one!
Just remembered that I have the following template saved from another project.
[code]
[/code]
This gets around the line breaking issue.
So...no progress! What I don't understand is why this:
[code][/code]
Gives me this:
[code][/code]
And this:
[code][/code]
Gives me:
[code][/code]
Mediacurrent is a bit... odd.
try this
[code]
[/code]
paramname and mediaCurrentAlias should be changed to your xslt parameter and macro paramater alias of course
should add, it's helpful to use to see the xml being returned from a given query, it helps to use this to construct the right xpath
Also, for linebreaks in textboxes you can use
[code]
[/code]
I just solved it thanks to this post:
http://forum.umbraco.org/yafpostst6295MediaCurrent-in-macro.aspx
Mediacurrent certainly is odd and certainly confusing!
Here is my final working XSLT:
It won't render the image in the RTE though - another problem for another day!
[quote=ddrayne]Mediacurrent is a bit... odd.
try this
[code]
[/code]
paramname and mediaCurrentAlias should be changed to your xslt parameter and macro paramater alias of course
[/quote]
The problem is that this replaces all the line breaks with
. There were no line breaks in the original copy it is the multi-line textbox that is assuming line breaks when it reaches the end of the line.
[quote=ddrayne]should add, it's helpful to use to see the xml being returned from a given query, it helps to use this to construct the right xpath
Also, for linebreaks in textboxes you can use
[code]
[/code][/quote]
The problem is that this replaces all the line breaks with
. There were no line breaks in the original copy it is the multi-line textbox that is assuming line breaks when it reaches the end of the line
is working on a reply...