We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Custom template? | Forum

Topic location: Forum home » Development » Themes
Marcus
Marcus Nov 4 '19
Hi folks is the a way I can use apart from default custom templates my own. I mean I'd like to add one to master pages let's call it custom.html now I just set it from my pluging...

const TEMPLATE_CUSTOM= 'custom';


OW::getDocument()->getMasterPage()->setTemplate(OW::getThemeManager()->getMasterPageTemplate(OW_MasterPage::TEMPLATE_CUSTOM));

Paul
Paul Nov 5 '19
I´ve used a completly new bootstrap template for the main page:


$landingpage = OW::getPluginManager()->getPlugin('pluginname')->getRootDir() . 'static/index.html';OW::getDocument()->getMasterPage()->setTemplate($landingpage);


toyota-supra.by

The Forum post is edited by Paul Nov 5 '19
Marcus
Marcus Nov 5 '19
Thanks Paul but Id like to add an extra html file to master pages and then use it when ever I need. OK gonna test it out later
OW-Ghost
OW-Ghost Nov 5 '19
paul, awsome main page :)


could you explain step by step how to do this? i never created a plugin before and not good at php.


or could i copy your plugin :) and files?


Quote from Paul I´ve used a completly new bootstrap template for the main page:


$landingpage = OW::getPluginManager()->getPlugin('pluginname')->getRootDir() . 'static/index.html';OW::getDocument()->getMasterPage()->setTemplate($landingpage);


toyota-supra.by


The Forum post is edited by OW-Ghost Nov 5 '19
Marcus
Marcus Nov 5 '19
OK sorry i completely miss read your initial reply. It will work but you gotta bind it to before master page render or maybe on before core render 
The Forum post is edited by Marcus Nov 5 '19