I'm unable to succeed - <%= node.Id %> always gets encoded and passed as string not as exact value of enumerated node.Id. I'm not sure, but I think this part worked for me yesterday and magically stoped to be ok today :) I'm not sure if it's achievable - I've seen documentation on passing cookies / request / current node parameters, but they're all connected to context elements not to custom ones that I have in list.
Other option of solving this would be to resign from having separate .ascx files for enumerated macros and do everything inline, but it would make this particular list macro grow to enormous size as the solution rises. I'd like to keep it separated to be able to decide which HTML code to render depending on document type of specific node.
Is it possible? Maybe I'm doing it wrong and there is another way of achieving the same results?
Passing parameter from code to .NET Macro
In my .ascx code I want to enumerate over collection of nodes and add macro for each one of them, prototype code looks this way:
I'm unable to succeed - <%= node.Id %> always gets encoded and passed as string not as exact value of enumerated node.Id. I'm not sure, but I think this part worked for me yesterday and magically stoped to be ok today :) I'm not sure if it's achievable - I've seen documentation on passing cookies / request / current node parameters, but they're all connected to context elements not to custom ones that I have in list.
Other option of solving this would be to resign from having separate .ascx files for enumerated macros and do everything inline, but it would make this particular list macro grow to enormous size as the solution rises. I'd like to keep it separated to be able to decide which HTML code to render depending on document type of specific node.
Is it possible? Maybe I'm doing it wrong and there is another way of achieving the same results?
Edit:
I was able to do it with the approach suggested here: http://munkimagik.wordpress.com/2009/04/08/adding-umbraco-macro-dynamically-to-user-control/ :
and
It works fine, but I'd like to know if it's achievable directly in .ascx code or I have to stick with code behind version.
is working on a reply...