[/code]
Running on umbraco v 4.0.0 (Assembly version: 1.0.3219.29118) Beta and is working fine.
I the copied the xslt to a new site's xslt file, created the tab/property needed and nothing happens.
I have tried to write some ordenary text i the if statement at it is not written on the page, but something written in the xslt outside the if statement is written on the page.
Hi Lars,
it sounds as if something is wrong with your imgAlias parameter. Did you spell it correctly and also add a value in your macro-call? You could try displaying the $imgAlias content outside the if.
Tommy, I have copy/pasted so I hope not it is spell error. I have pasted the macro call at the top of the code section, and the macro itself underneath so you can see if I call it write.
I have tried to write the variable outside the if with this code
[code]
[/code]
I get this in the page sourcecode: "div text="StartSlut" />" so it does not output anything.
(If I have done it right, its probably not the best way.)
hoehler, if I try to use your code I get this error:
[code](XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current)
at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer, Boolean closeWriter)
at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter results)
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)[/code]
I have just upgraded to version "umbraco v 4.0.2.1 (Assembly version: 1.0.3441.17657)"
Lars, are you sure you created the imgAlias parameter correctly on the macro parameters tab - and are you sure you are passing a value when using the parameter?
Ahhhhhh sorry, no I had forgot there was a parameter tab on the Marco, and did not get it the first time you tried.
Now the response thing I made responses what it's supposed to.
It still, however does not work, but will look into that and response back.
if statement not working.
Hi
I have this:
[code]
Template:
* The Property alias of the Media Picker is (of cause) imgPic *
XSLT:
]>
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]
Running on umbraco v 4.0.0 (Assembly version: 1.0.3219.29118) Beta and is working fine.
I the copied the xslt to a new site's xslt file, created the tab/property needed and nothing happens.
I have tried to write some ordenary text i the if statement at it is not written on the page, but something written in the xslt outside the if statement is written on the page.
I also tried to change "
Hi Lars,
it sounds as if something is wrong with your imgAlias parameter. Did you spell it correctly and also add a value in your macro-call? You could try displaying the $imgAlias content outside the if.
try
[code]
Hi
Tommy, I have copy/pasted so I hope not it is spell error. I have pasted the macro call at the top of the code section, and the macro itself underneath so you can see if I call it write.
I have tried to write the variable outside the if with this code
[code]
I get this in the page sourcecode: "div text="StartSlut" />" so it does not output anything.
(If I have done it right, its probably not the best way.)
hoehler, if I try to use your code I get this error:
[code](XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current)
at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer, Boolean closeWriter)
at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter results)
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)[/code]
I have just upgraded to version "umbraco v 4.0.2.1 (Assembly version: 1.0.3441.17657)"
Any other thoughts?
/Lars
Lars, are you sure you created the imgAlias parameter correctly on the macro parameters tab - and are you sure you are passing a value when using the parameter?
Ahhhhhh sorry, no I had forgot there was a parameter tab on the Marco, and did not get it the first time you tried.
Now the response thing I made responses what it's supposed to.
It still, however does not work, but will look into that and response back.
Thank you for your help so far.
OK norphf I recommend to help you debug before your if is to either do
[code][/code]
or
[code][/code]
Warren :)
Sorry for the long reply, its working now thank you all.
is working on a reply...