I have checked the cached values for the Macro on the umbraco Developer tab and the value for the customerType attribute is not part of the cache key, so it appears like it came through blank
The CustomerTypeContextManager is a static class that is just accessing values in the Request context, like querystring, cookies etc.
I would have gone for the following, but it appears not to work in that combination in Umbraco 4.0.3
Macro caching and .NET databinding syntax
ASP.NET 3.5
Umbraco 4.0.3
I've been trying to get a macro to cache its output, depending on the value of a variable that I set on an attribute of the macro
1.
For some reason the above does not work, even though if I do the following:
2.
I do get a value output to the page.
I have checked the cached values for the Macro on the umbraco Developer tab and the value for the customerType attribute is not part of the cache key, so it appears like it came through blank
The CustomerTypeContextManager is a static class that is just accessing values in the Request context, like querystring, cookies etc.
I would have gone for the following, but it appears not to work in that combination in Umbraco 4.0.3
3.
<umbraco:macro value="[@requestValue], [%cookieValue], [$pageVariable]" />
I think even adding the spaces after the commas would break the last approach.
Anyone got any ideas why approach no. 1. does not seem to work?
Ignore this topic - I think I have answered the question.
I am not running the code above inside a <form runat="server"> and there are no datasources on the page. DataBinding syntax does not apply here.
Pity - workaround failed. Still no straight forward native umbraco way to coalesce request, cookie and document type variables yet.
is working on a reply...