PlumbBum Posted July 24, 2012 Report 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
Moderators Kyle Posted July 24, 2012 Moderators Report 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
PlumbBum Posted July 24, 2012 Author Report 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
Moderators Kyle Posted July 24, 2012 Moderators Report Posted July 24, 2012 It's done auto. Nothing need to edit the core files. Quote
PlumbBum Posted July 24, 2012 Author Report 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
Sava Posted July 24, 2012 Report 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
PlumbBum Posted July 25, 2012 Author Report 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
Jon Posted July 25, 2012 Report 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
PlumbBum Posted July 26, 2012 Author Report 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
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.