Jump to content

prependTemplateFile


joey102030
 Share

Recommended Posts

// prependFile: Filename to prepend to output, must be in /site/templates/. (default=$config->prependTemplateFile)

PageRender.module #302

$output->setPrependFilename($config->paths->templates . wire('sanitizer')->name($options['prependFile']));

It runs the value through $sanitizer->name which doesn't allow "/". So no it's not possible.

  • Like 2
Link to comment
Share on other sites

  • 10 months later...
  • 4 years later...

This still seems to be the case in 2019... the files set in $config->prependTemplateFile and $config->appendTemplateFile must be in /site/templates/:
https://github.com/processwire/processwire/blob/649d2569abc10bac43e98ca98db474dd3d6603ca/wire/modules/PageRender.module#L362

If there's a way around this, I'd really like to know.

Note: Regular template file locations can effectively be anywhere with the hook mentioned in this GitHub issue:
https://github.com/processwire/processwire-requests/issues/204

 

 

  • Like 1
Link to comment
Share on other sites

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
 Share

×
×
  • Create New...