sm5k Posted October 15, 2013 Share Posted October 15, 2013 Hi there community, i got a question where google couldn´t help me so i decided to ask you. Can you tell me if it is possible to do different themes / layouts on different CMS Views / Pages. A theme per CMS view? I know that it is possible with categories and found instructions on how to do that but it seems there is no information on how to do that for cms pages. Any Ideas? Thx a lot Toby Link to comment Share on other sites More sharing options...
vekia Posted October 15, 2013 Share Posted October 15, 2013 hello it is possible to any part of your website, i described whole process here: http://www.prestashop.com/forums/topic/276596-different-product-page-for-one-of-products/ do the same for CMSController.php instead of id_product just use id_cms if (Tools::getValue('id_cms')==2){ $this->setTemplate(_PS_THEME_DIR_.'my-new-cms-template.tpl'); } else { $this->setTemplate(_PS_THEME_DIR_.'cms.tpl'); } will work then as you want 1 Link to comment Share on other sites More sharing options...
sm5k Posted October 15, 2013 Author Share Posted October 15, 2013 Hey Vekia, thanks for your fast help. That nails the problem to 90%. It changes everything excepting the navbar. We need different ways of navigation per CMS Page. Think this could not be done by the CMSController.php or am i wrong? Thx Toby Link to comment Share on other sites More sharing options...
vekia Posted October 15, 2013 Share Posted October 15, 2013 what you mean by nav bar? if some module, which one? default top horizontal menu? what theme you use? everything depends on these two things Link to comment Share on other sites More sharing options...
sm5k Posted October 15, 2013 Author Share Posted October 15, 2013 (edited) Hey Vekia, yes i mean the horizontal menu. The links inside the module should be depending on the CMS Page you are. Example: Startpage nav links: Link 1 - Link 2 - Link 3 On klick on Link 3 the nav links should be like: Link 4 - Link 5 - Link 6 You understand or should i describe better? TY!!! ____ Forgot to tell: - I use a modified version of the default theme___ Edited October 15, 2013 by sm5k (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted October 15, 2013 Share Posted October 15, 2013 well, it is possible but it will be hard to achieve. mainly because top horizontal menu doesnt allow to use links only on certain pages - and also doesnt allow to define several "types" of configuration. you will have to modify module .php file, add some if conditions thich will check what kind of page you're browsing and then display - specific content. But in this case - whole link tree you will have to define manually. Link to comment Share on other sites More sharing options...
sm5k Posted October 16, 2013 Author Share Posted October 16, 2013 Hey Vekia, thanks for that answer. It`s good to know that is possible Link to comment Share on other sites More sharing options...
sm5k Posted October 22, 2013 Author Share Posted October 22, 2013 Hey Vekia, which module .php do you mean i have to modify? Could you please give me a small code example? Than i think i could get it Thanx a lot. Link to comment Share on other sites More sharing options...
vekia Posted October 22, 2013 Share Posted October 22, 2013 Hey Vekia, which module .php do you mean i have to modify? Could you please give me a small code example? Than i think i could get it Thanx a lot. sorry but i don't know what you expect, you're talking about main case in this thread? if so, you have to edit cms controller located in controllers/front/CmsController.php file Link to comment Share on other sites More sharing options...
sm5k Posted October 22, 2013 Author Share Posted October 22, 2013 Hey Vekia, this was good help. Think that was what i was searching for. T-H-A-N-K ---Y-O-U 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