Programmatically pass parameter to Macro when rendered in a Grid layout
Hi!
I'm developing a site where I make a lot of use of the Grid layout. I've created a number of Macros that I pass certain parameters to. This all works great, and I really love working with the Grid!
Now to my problem; I want to pass the width of the column hosting the Macro to the Macro itself. I tried doing this programmatically, but it seems you can't pass parameters to a Macro without having to create them in the database, is that right?
But that doesn't seem to work. The parameters collection does have two objects going in to the RenderMacro, but coming out the other side it only has the ones being created in the loop.
Is there a way to pass "hidden" parameters to a Macro without the editor having to see them?
Programmatically pass parameter to Macro when rendered in a Grid layout
Hi!
I'm developing a site where I make a lot of use of the Grid layout. I've created a number of Macros that I pass certain parameters to. This all works great, and I really love working with the Grid!
Now to my problem; I want to pass the width of the column hosting the Macro to the Macro itself. I tried doing this programmatically, but it seems you can't pass parameters to a Macro without having to create them in the database, is that right?
I've tried this:
But that doesn't seem to work. The parameters collection does have two objects going in to the RenderMacro, but coming out the other side it only has the ones being created in the loop.
Is there a way to pass "hidden" parameters to a Macro without the editor having to see them?
Thank you in advance!
Hi Oscar,
The way the macro normally looks like when it has a macro parameter added to it is like this.
And if you have more than one parameter it will look like this:
Perhaps this can help you further.
/Dennis
Thanks for your reply!
But the parameter still needs to be created in the database, right? That's what I'm looking to circumvent.
is working on a reply...