XF 2.0 Macros/xf:set for accessing forum_view template methods?

DistortedDorian

Active member
Hello there.

I am trying to access methods from forum_view template in the PAGE_CONTAINER template such as $forum.canWatch() or $forum.canCreateThread(). I understand that a macro with combination of xf:set can achieve this but yet I can't puzzle it together, is there any example I could see to understand how to access methods from forum_view?

Thanks.
 
Generally speaking, you can't access page-specific values in the container. Macros won't help here. There is the <xf:page> tag, though this is generally used for pushing up specific "known" elements.

What are you actually trying to do?
 
You can potentially do something like this:
Code:
<xf:page option="forum" value="{$forum}" />

Though in most cases, there are likely better approaches (such as pushing up rendered HTML, rather than the variable).
 
Thanks for the suggestion @Mike.

Although, using it doesn't allow me to access forum_view variables in page_container:
PHP:
<xf:page option="forum" value="{$forum}" />

Current node: {{$forum.Node.title}}
Doesn't parse the variable
Current node:
How else can I access it?
 
Top Bottom