Page 1 of 1

Adding some html to a page or new layout for a page?

Posted: Tue Jul 02, 2013 7:14 pm
by jonah
Hi I hope someone can help.

I'm working on a site which is set up fine and works well. But it uses an Order Form module which lets customer order a product to requirements rather than what is listed on there already.

The form is here: http://www.krazycatjewels.co.uk/index.p ... &form_id=1

Now all the other shop pages are fine, but just for this page I'd like to have the form where it is on the left, and then to the right of it a photograph.

So whether I need a two column page, or an image just added to the template code I'm not sure... But how do I make a different layout/template or where can I edit this in the existing template files?

Thanks very much for any help.

Re: Adding some html to a page or new layout for a page?

Posted: Wed Jul 03, 2013 8:29 pm
by Xyph3r
create new layout in system/design/layout

path : "information/form" - no quotes

Re: Adding some html to a page or new layout for a page?

Posted: Wed Jul 03, 2013 9:00 pm
by jonah
Hi thanks for the help, I've added this new design layout, but where do I then add some styling to it (columns, images, html) etc?

Thanks for any help.

Re: Adding some html to a page or new layout for a page?

Posted: Wed Jul 03, 2013 9:25 pm
by Xyph3r
modules/banner - banenrs
modules/welcom - for html code

Re: Adding some html to a page or new layout for a page?

Posted: Wed Jul 03, 2013 10:00 pm
by jonah
Hi thanks, I didn't think to use the modular approach already available, of course! - the only issue is with this page in particular I wanted to have more of a 50%-50% two column, as the order form takes half the width of the page up and then the image will take up the other half. I've implemented what you've advised which works great but the right column is very narrow as it's really intended for a menu...

Anyway to override this just for this page?

Thanks again.

Re: Adding some html to a page or new layout for a page?

Posted: Thu Jul 04, 2013 8:50 pm
by Xyph3r
better use a background image for container on this page only..

Re: Adding some html to a page or new layout for a page?

Posted: Thu Jul 04, 2013 9:26 pm
by jonah
Xyph3r wrote:better use a background image for container on this page only..
Hi thanks so what's the most efficient way to set that up? Do you mean put html in the Welcome that contains a div or class and then add to the css to add an image to that class? How do I make that then overflow into the main column also?

Sorry I'm just looking for the most simple way to keep things clean.

Thanks again.

Re: Adding some html to a page or new layout for a page?

Posted: Sat Jul 06, 2013 3:44 am
by Xyph3r

Code: Select all

<div id "container" <?php if(!empty($this->request->get['route']) && $this->request->get['route'] == 'information/form') { ?>class="custom_container"<?php } ?>>
in header.tpl try replacing

Code: Select all

<div id="container">
with the code above...Back-UP First!

after..in stylesheet..asign a background to ..

Code: Select all

.custom_container
I'm very tired right now..so this is all I can tell you..

Re: Adding some html to a page or new layout for a page?

Posted: Sat Jul 06, 2013 6:53 pm
by jonah
Hi thanks very much for your help. I think we're nearly there...

My problem now is this seems to be in the wrong DIV as even if I float it to the right, it moves around if you resize the browser.

I'd really like the image to site next to the form within the "content" div and float right. I can't see the "content" div in the header.tpl file though, so I tried to move the code within "container-inner" to see if that would work:

Code: Select all

<div id="container-inner" class="wrapper clearafter"  <?php if(!empty($this->request->get['route']) && $this->request->get['route'] == 'information/form') { ?>class="wrapper clearafter custom_container"<?php } ?> >
This didn't work though and just didn't show any background image... I've put the code back where you suggested, but as you can see this isn't going to sit with the form:

http://www.krazycatjewels.co.uk/index.p ... &form_id=1

Can you please help me get this in the right place? Thanks very much.

Re: Adding some html to a page or new layout for a page?

Posted: Sun Jul 07, 2013 3:14 am
by Xyph3r

Code: Select all

<div id="container-inner" class="wrapper clearafter<?php if(!empty($this->request->get['route']) && $this->request->get['route'] == 'information/form') { ?> custom_container<?php } ?>">

Re: Adding some html to a page or new layout for a page?

Posted: Sun Jul 07, 2013 8:19 pm
by jonah
Fantastic, that's just how I wanted it. Thanks again.