Jump to content

Main Content Box


PlumbBum

Recommended Posts

Hello, at the moment this is the homepage..

58663.png

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..

45519.png

and when you visit a page, the boxes are gone

88436.png

So how do I change the div name of where the content loads?

Any help appreciated,

Regards,

Daniel Plumb

Link to comment
Share on other sites

  • Moderators

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!

  • Like 1
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 ;)

Link to comment
Share on other sites

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

  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...