hqarrse
Active member
I am sure this has been covered somewhere in the forums multiple times, but I just cannot find it. Apologies if I am asking an stupid question.
I have a small mod that checks for attachments in posts on a page and sets a variable to 1 or 0 depending on the outcome. The result is used in page_container_js_head to make a decision about advertising content.
This is the abbreviated code:
Is there a nice simple way that I can also make the 'hasAttachments' template variable also available in the thread_view template, ideally without adding any significant backend code?
Thanks
I have a small mod that checks for attachments in posts on a page and sets a variable to 1 or 0 depending on the outcome. The result is used in page_container_js_head to make a decision about advertising content.
This is the abbreviated code:
Code:
class Olivenet_CheckAtts_ControllerPublic_CheckAtts extends XFCP_Olivenet_CheckAtts_ControllerPublic_CheckAtts
{
protected function _postDispatch($controllerResponse, $controllerName, $action)
{
..........
........
$controllerResponse->containerParams['hasAttachments'] = 1;
.............
}
}
Is there a nice simple way that I can also make the 'hasAttachments' template variable also available in the thread_view template, ideally without adding any significant backend code?
Thanks