Dannymh
Active member
I am building some macros that will sit in various areas. For instance in the thread_view we have the post_macros. I am using a template modification to add a macro into the post_macros which works, However I also have an extension on the thread controller where I add some params that I pass as an argument to the thread_view.
However as the post_macros by default don't take in these params as arguments, I would have to do more extensions to pass that information into the post_macros which adds the arguments into say post.
Is there a way to have my macro which sits inside post_macros take on the arguments that are passed into the thread_view
Structurally in looks like this
<thread_view>
<macro name="mymacro" arg-threads="{$threads" arg-myarg="{$myargarray}>
that works fine however if I then include it in
<thread_view>
<macro name="post_macros">
<macro name="mymacro" arg-threads="{$threads" arg-myarg="{$myargarray}>
then $myarray wont have any values as it wasn't passed to post_macros
I looked at the macro extensions but could'nt see how this would work either. Basically I want to pass the parameters down from my extended thread controller to anywhere in the thread_view including inside macros in that view.
Is this possible?
The only other work around, which will require a bit of a re-write at this stage is to possible add these variables as getters in the thread entity which may also work.
Thanks for any help you can offer
However as the post_macros by default don't take in these params as arguments, I would have to do more extensions to pass that information into the post_macros which adds the arguments into say post.
Is there a way to have my macro which sits inside post_macros take on the arguments that are passed into the thread_view
Structurally in looks like this
<thread_view>
<macro name="mymacro" arg-threads="{$threads" arg-myarg="{$myargarray}>
that works fine however if I then include it in
<thread_view>
<macro name="post_macros">
<macro name="mymacro" arg-threads="{$threads" arg-myarg="{$myargarray}>
then $myarray wont have any values as it wasn't passed to post_macros
I looked at the macro extensions but could'nt see how this would work either. Basically I want to pass the parameters down from my extended thread controller to anywhere in the thread_view including inside macros in that view.
Is this possible?
The only other work around, which will require a bit of a re-write at this stage is to possible add these variables as getters in the thread entity which may also work.
Thanks for any help you can offer