Page 1 of 1

Understanding Layouts

Posted: Wed Mar 21, 2012 8:34 pm
by subdivide
Hey All,

Ok so I thought I had a good grasp of the layout system, but clearly I'm missing something, and here's what I mean.

In the default setup, the Checkout layout has a route of

checkout/

It was my understanding that this would mean that any route called that was a child of the checkout process would use the Checkout layout. For instance adding a route of checkout/success would have no affect as success is already routed to the Checkout layout since it's a child of the checkout process.

So if I wanted to create different layouts for checkout/cart and checkout/success I would need to change the existing Checkout layout and add all the child routes that I wish to remain in that layout and move checkout/success and checkout/cart to either a different existing layout, or create a new layout just for them.

So I set the Checkout layout to checkout/checkout and create new layouts Checkout Success with a route of checkout/success, and Checkout Cart with a route of checkout/cart.

I then went to my Bestseller module and added the module to the Checkout Cart layout with a placement of Content Bottom and enabled it. But when I go now to checkout/cart I still have the original Checkout layout. And the same applies to my new Checkout Success layout as well.

What am I not understanding?

Is there some interior override thats taking place that I can't find? Is it a bug, or am I just not getting it?

Thanks for your help.

-Vince

Re: Understanding Layouts

Posted: Thu Mar 22, 2012 4:00 am
by Qphoria

Re: Understanding Layouts

Posted: Thu Mar 22, 2012 4:07 am
by subdivide
Yeah thanks.

I've already seen that and it doesn't answer my question at all.

Maybe you didn't read the post ...

Is my understanding of how routes are parsed to layouts correct or no?

Thanks.

Re: Understanding Layouts

Posted: Thu Mar 22, 2012 5:07 am
by Qphoria
yes

Re: Understanding Layouts

Posted: Thu Mar 22, 2012 5:23 am
by subdivide
Ok, I guess I must have a bug somewhere then.

hmmmmm ....

now the fun begins :)

Thanks.

Understanding Layouts

Posted: Thu Mar 22, 2012 7:30 am
by uksitebuilder
This might not help but I'll throw it up anyways

Make sure in your layouts that none have just an empty route added

They can have no routes but not empty ones

Re: Understanding Layouts

Posted: Sat Apr 07, 2012 5:55 pm
by learner&coder
i want to create position for module. how to do it. i tried it in template/common/homp.tpl.
but i don't know how to do it. Please help me. I am trying it from last 2 days. I have already post in forum but didn't get any reply.

Re: Understanding Layouts

Posted: Fri May 04, 2012 7:37 pm
by TML
I have read http://forum.opencart.com/viewtopic.php?f=138&t=37119

1. I have created a custom Layout.
2. I use SEO keywords; is that a problem?
3. For the route I have tried:
hxxp://www.mypage.ca/TEETHING/Tething-Rings
www.mypage.ca/TEETHING/Teething-Rings
TEETHING/Teething-Rings
Teething-Rings

Nothing has worked, what am I doing wrong? :bash:

I have tested my custom module using the layouts that came with opencart and the module works fine, however
I only want the module to work on a single page.

Thank you in advance

Re: Understanding Layouts

Posted: Fri May 04, 2012 8:38 pm
by Qphoria
TML wrote:I have read http://forum.opencart.com/viewtopic.php?f=138&t=37119

1. I have created a custom Layout.
2. I use SEO keywords; is that a problem?
3. For the route I have tried:
hxxp://www.mypage.ca/TEETHING/Tething-Rings
http://www.mypage.ca/TEETHING/Teething-Rings
TEETHING/Teething-Rings
Teething-Rings

Nothing has worked, what am I doing wrong? :bash:

I have tested my custom module using the layouts that came with opencart and the module works fine, however
I only want the module to work on a single page.

Thank you in advance
This has nothing to do with layouts. This is just your SEO keywords. Be sure it is enabled in the system->settings on the server tab. And be sure you rename your htaccess.txt file to .htaccess so the modRewrite for url is enabled

Re: Understanding Layouts

Posted: Fri May 04, 2012 8:51 pm
by TML
Thank you for the quick reply.
I checked what you said and the SEO Keywords is on in the settings tab.

Image

Also the .htaccess rewrite rule is on.
Image

It is still not working, what would the next step be?
Thank you again.

Re: Understanding Layouts

Posted: Mon May 07, 2012 1:28 am
by TML
I'll check out the FAQ on the SEO Keywords and see where I may have gone wrong.

If anyone has an immediate answer please post it.

Thank you in advance.