XF 2.1 Hide ad in a custom node

abdfahim

Well-known member
I have a custom page which is accessible at example.com/portal-a. The page is loaded via an action class.

What conditional should I use to hide advertisements on that page?

I tried to get the template name, but couldn't really find out which variable stores that information. Tried {{ dump(vars()) }}, {{ dump($xf) }}, {{ dump($template) }} with no luck.
 
Ask the developer what the name of the template is.
I am the developer, so I know the template name. But the question is, how can I add a conditional in advertisement manager to check the template name? Do I need to send a variable containing my template name from my class, or XF has some default variable which always stores the template name?


Currently, my actionIndex outputs below
PHP:
$viewParams = ['data' => $data];
return $this->view('Fahim:View', 'my_templatee', $viewParams);
 
Back
Top Bottom