my package name - company , theme name web. , have other package named system , theme package component.
run time block file want set theme , package front-end side in magento2.
any appreciated.
thanks in advanced.
if want set package , theme @ run time in magento use code snippet.
create 1 function ex. changetheme('theme-name'); , run function requirement
add function in head.phtml after php start.
function changetheme($themename) { mage::getdesign()->setarea('frontend') //area (frontend|adminhtml) ->setpackagename('default') //name of package ->settheme($themename); // name of theme }
enjoy :)
Comments
Post a Comment