Mike Rockett Posted February 7, 2015 Share Posted February 7, 2015 If this can already be done, then shoot me. I often find myself specifying the header/footer (prepend/append) for each template on every site I make. I think this could be automated, if asked to be by the developer/designer. This could be done by means of a check box for each. "Prepend this file to all templates" and "Append this file..." Feasible? Link to comment Share on other sites More sharing options...
LostKobrakai Posted February 7, 2015 Share Posted February 7, 2015 /** * Prepend template file * * PHP file in /site/templates/ that will be loaded before each page's template file. * * #notes Example: _init.php * @var string * */ $config->prependTemplateFile = ''; /** * Append template file * * PHP file in /site/templates/ that will be loaded after each page's template file. * * #notes Example: _main.php * @var string * */ $config->appendTemplateFile = ''; Additionally there are settings about changing / preventing these configs in the template edit section. Link to comment Share on other sites More sharing options...
Mike Rockett Posted February 7, 2015 Author Share Posted February 7, 2015 So the admin interface is then for overrides only? Link to comment Share on other sites More sharing options...
LostKobrakai Posted February 7, 2015 Share Posted February 7, 2015 Yeah, that's what it's meant for. Or at least for single instances of using append / prepend. Link to comment Share on other sites More sharing options...
Mike Rockett Posted February 7, 2015 Author Share Posted February 7, 2015 The separation just feels weird, ya know? Link to comment Share on other sites More sharing options...
LostKobrakai Posted February 7, 2015 Share Posted February 7, 2015 The just isn't a global configuration gui in ProcessWire right now. (Read below) But it shouldn't be hard to just pack all those $config variables in a module with some forms. I think to remember that Ryan some time ago said it's this way so /site/config.php doesn't have to be writeable or something like that. Link to comment Share on other sites More sharing options...
Soma Posted February 7, 2015 Share Posted February 7, 2015 There's a process configuration now where you can have ui of config.php. read the blog. Link to comment Share on other sites More sharing options...
LostKobrakai Posted February 7, 2015 Share Posted February 7, 2015 Oh, that's where I read about it. Somehow I thought this would become part of the core and therefore I thought it would be not ready yet. Link to comment Share on other sites More sharing options...
kongondo Posted February 7, 2015 Share Posted February 7, 2015 (edited) It is ready in the dev branch ...No its not.....at least not yet....see below Edited February 7, 2015 by kongondo Link to comment Share on other sites More sharing options...
LostKobrakai Posted February 7, 2015 Share Posted February 7, 2015 It's not really in the dev branch. It's still an extra module to install by now even though it looks like it would be in the core if one just reads over the first lines. That's what confused me about it, because I thought I would have noticed it sometimes as a core module. Link to comment Share on other sites More sharing options...
kongondo Posted February 7, 2015 Share Posted February 7, 2015 My bad...I get you now... Link to comment Share on other sites More sharing options...
Mike Rockett Posted February 7, 2015 Author Share Posted February 7, 2015 Yeah, even with the config module, there's still separation. That said, it's not a heavy separation - i.e. between back-end and code. Would be cool if there was a proper way to manage these links/attachments in terms of a global scope. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now