Jump to content

Recommended Posts

Posted

As far as I know there are these two methods: adding it to each templates via the 'Files' tab, or including it on every .php template file.

Are there other ways?

Thanks

  • 3 weeks later...
Posted

this file then needs to be in site/templates/, so site/templates/_init.php (but can be named anything you want)
the cool thing is, you can still decide on a individual template setting level (under templates -> edit -> files) to NOT prepend this file, or to prepend a different file. Same goes for $config->appendTemplateFile, where you could state an always after the template file. see https://processwire.com/api/ref/config/ -> "Template files"

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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