<!-- Error generating macroContent: 'System.ArgumentException: The
string parameter 'key' cannot be null or empty.
Parameter name: key at System.Web.UI.StateBag.get_Item(String key) at
System.Web.UI.AttributeCollection.get_Item(String key) at
umbraco.template.parseStringBuilder(StringBuilder tempOutput, page
umbPage) in
d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\presentation\template.cs:line
208 at umbraco.library.RenderMacroContent(String Text, Int32 PageId) in
d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\presentation\library.cs:line
1125' -->
Does anyone know what 'key' refers to? Has anyone else sucessfully used the MacroPicker in XSLT? Should I be doing something other than using "RenderMacroContent" to get its output?
Not sure what the content node Id was, so just used "1234" for this example.
Only other thing I noticed about the Macro text/tag is that the attribute "ExcludeIfSamePage" has a space after it, and before the equals symbol? But thinking that's a copy-n-paste issue on the forum?
Rendering MacroPicker data with XSLT?
Hi, I am using the MacroPicker datatype (http://our.umbraco.org/projects/macropicker)
Setting it up wasn't a problem, but now I am having a problem using the data from a node in an XSLT.
This code:
Returns this error as output:
<!-- Error generating macroContent: 'System.ArgumentException: The string parameter 'key' cannot be null or empty. Parameter name: key at System.Web.UI.StateBag.get_Item(String key) at System.Web.UI.AttributeCollection.get_Item(String key) at umbraco.template.parseStringBuilder(StringBuilder tempOutput, page umbPage) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\presentation\template.cs:line 208 at umbraco.library.RenderMacroContent(String Text, Int32 PageId) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\presentation\library.cs:line 1125' -->
Does anyone know what 'key' refers to? Has anyone else sucessfully used the MacroPicker in XSLT? Should I be doing something other than using "RenderMacroContent" to get its output?
If I just do this:
It outputs this:
<?UMBRACO_MACRO macroalias="Testimonials_GetRandom" numberOfItems="1" source="1216" IncludeHeader="0" IncludeImage="0" ImageWidth="" ImageHeight="" ExcludeIfSamePage ="0" />
Thanks for any ideas!
~Heather
BTW: I am using umbraco v 4.0.4.1 (Assembly version: 1.0.3793.17632)
Hi Heather,
Have you tried rendering the literal Macro text/tag?
Not sure what the content node Id was, so just used "1234" for this example.
Only other thing I noticed about the Macro text/tag is that the attribute "ExcludeIfSamePage" has a space after it, and before the equals symbol? But thinking that's a copy-n-paste issue on the forum?
Let us know how it goes.
Cheers, Lee.
is working on a reply...