PlumbBum Posted July 24, 2012 Report Share Posted July 24, 2012 Hello, at the moment this is the homepage.. However I only want the side boxes on the homepage, and for the rest of the pages e.g. profiles, i want just one big box covering the whole screen.. how can I make it so that the content loads into the box - this is my first skin I've created and this is the only thing I don't know how to do So with another virtual airline Their homepage is like this.. and when you visit a page, the boxes are gone So how do I change the div name of where the content loads? Any help appreciated, Regards, Daniel Plumb Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted July 24, 2012 Moderators Report Share Posted July 24, 2012 Okay, an example... in layout.tpl, you have the content. No sidebars, none. So, if you wanted the sidebar in the frontpage only, you can add the div for the sidebar in the frontpage_main.tpl only. This how you would get it working and not have the sidebar load on anyother pages. Cheers! 1 Quote Link to comment Share on other sites More sharing options...
PlumbBum Posted July 24, 2012 Author Report Share Posted July 24, 2012 Okay, an example... in layout.tpl, you have the content. No sidebars, none. So, if you wanted the sidebar in the frontpage only, you can add the div for the sidebar in the frontpage_main.tpl only. This how you would get it working and not have the sidebar load on anyother pages. Cheers! Ooh brilliant - So how do I make it so that frontpage_main.tpl loads when the user loads the website? Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted July 24, 2012 Moderators Report Share Posted July 24, 2012 It's done auto. Nothing need to edit the core files. Quote Link to comment Share on other sites More sharing options...
PlumbBum Posted July 24, 2012 Author Report Share Posted July 24, 2012 I haven't actually got a frontpage_main.tpl in my skin directory.. so....? I really dont understand the concept of PHPVMS files lol cheers for your help in advanced Quote Link to comment Share on other sites More sharing options...
Sava Posted July 24, 2012 Report Share Posted July 24, 2012 It works like this. The system first looks for a tpl in the active skin folder, than if none is found it looks in core/templates directory. If you edit any files you should first copy them to the skin folder and than edit them so you still have a default copy if you need for updates etc. So, look in core/templates. if you can not find it, make one yourself and place it in the skin folder Quote Link to comment Share on other sites More sharing options...
PlumbBum Posted July 25, 2012 Author Report Share Posted July 25, 2012 Oh my good god This is so difficult. Would anyone be willing to do it for me if I was to pay them? - All it is is making the homepage show on first load, then just a box with the content in it for the other pages. Cheers, Daniel Quote Link to comment Share on other sites More sharing options...
Jon Posted July 25, 2012 Report Share Posted July 25, 2012 It's pretty simple to grasp once you know how, here's how I would do it: <!--The Invisible Div --> <div class="wrapper"> <!-- Set out the layout for the frontpage --> <div class="right"> <!-- This checks if we are on the frontpage --> <?php if(MainController::$activeModule == 'FRONTPAGE') echo $page_content; else { ?> </div> <!-- Echo the content into the full page --> <div class="full"> <?php echo $page_content; ?> </div> <?php } ?> </div> </div> That's not tested but it should lead you in the right direction for what you want. You can then just call the left hand side div for your homepage in frontpage_main.tpl Jon 1 Quote Link to comment Share on other sites More sharing options...
PlumbBum Posted July 26, 2012 Author Report Share Posted July 26, 2012 It works like this. The system first looks for a tpl in the active skin folder, than if none is found it looks in core/templates directory. If you edit any files you should first copy them to the skin folder and than edit them so you still have a default copy if you need for updates etc. So, look in core/templates. if you can not find it, make one yourself and place it in the skin folder I understand the concept of the files now more.. thanks It's pretty simple to grasp once you know how, here's how I would do it: <!--The Invisible Div --> <div class="wrapper"> <!-- Set out the layout for the frontpage --> <div class="right"> <!-- This checks if we are on the frontpage --> <?php if(MainController::$activeModule == 'FRONTPAGE') echo $page_content; else { ?> </div> <!-- Echo the content into the full page --> <div class="full"> <?php echo $page_content; ?> </div> <?php } ?> </div> </div> That's not tested but it should lead you in the right direction for what you want. You can then just call the left hand side div for your homepage in frontpage_main.tpl Jon Thank you Jon! Much appreciate.. managed to do it with some of these code snippets! cheers. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.