Jump to content

Custom Block/Template on Blog App


Go to solution Solved by Daniel F,

Recommended Posts

Posted
1 hour ago, Daniel F said:

This should work inside your template:

{{if \IPS\Request::i()->app == 'blogs'}}
your code
{{endif}}

 


Hi @Daniel F I tried this in custom template, also tried to put this into global template too but this is not working the else condition is working everywhere including Blog App

 {{if \IPS\Request::i()->app == 'blogs'}}     
            {template="customblog" app="blog" group="view" location="front" params=""}
             {{else}}
             test
             {{endif}}

  • Solution
Posted

Apologies, this was the wrong code.

 

That's the correct one:

{{if \IPS\Dispatcher::i()->application->directory == 'blog'}}
Your code to show only inside blogs
{{endif}}

 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...