Community Forums

Understanding Layouts

Coding & concept discussion for OpenCart v1.x development

Understanding Layouts

Postby subdivide » Wed Mar 21, 2012 12:34 pm

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
User avatar
subdivide
 
Posts: 29
Joined: Sun Jan 01, 2012 1:47 am

Re: Understanding Layouts

Postby Qphoria » Wed Mar 21, 2012 8:00 pm

Be sure to read this:

viewtopic.php?f=138&t=37119
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18242
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: Understanding Layouts

Postby subdivide » Wed Mar 21, 2012 8:07 pm

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.
User avatar
subdivide
 
Posts: 29
Joined: Sun Jan 01, 2012 1:47 am

Re: Understanding Layouts

Postby Qphoria » Wed Mar 21, 2012 9:07 pm

yes
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18242
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: Understanding Layouts

Postby subdivide » Wed Mar 21, 2012 9:23 pm

Ok, I guess I must have a bug somewhere then.

hmmmmm ....

now the fun begins :)

Thanks.
User avatar
subdivide
 
Posts: 29
Joined: Sun Jan 01, 2012 1:47 am

Understanding Layouts

Postby uksitebuilder » Wed Mar 21, 2012 11:30 pm

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
User avatar
uksitebuilder
 
Posts: 5602
Joined: Thu Jun 09, 2011 3:37 pm
Location: United Kindgom

Re: Understanding Layouts

Postby learner&coder » Sat Apr 07, 2012 9:55 am

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.
learner&coder
 
Posts: 19
Joined: Mon Apr 02, 2012 6:20 am

Re: Understanding Layouts

Postby TML » Fri May 04, 2012 11:37 am

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
TML: Time Machine for Linux
User avatar
TML
 
Posts: 17
Joined: Sat Aug 27, 2011 2:41 pm
Location: Ontario, Canada

Re: Understanding Layouts

Postby Qphoria » Fri May 04, 2012 12:38 pm

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
Image Image
Donate!|OpenCart Basics|GeoZones
Help me get more development cloud storage - Click Here to get DropBox
User avatar
Qphoria
Administrator
 
Posts: 18242
Joined: Mon Jul 21, 2008 7:02 pm
Donate to Qphoria

Re: Understanding Layouts

Postby TML » Fri May 04, 2012 12:51 pm

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.
TML: Time Machine for Linux
User avatar
TML
 
Posts: 17
Joined: Sat Aug 27, 2011 2:41 pm
Location: Ontario, Canada

Re: Understanding Layouts

Postby TML » Sun May 06, 2012 5:28 pm

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.
TML: Time Machine for Linux
User avatar
TML
 
Posts: 17
Joined: Sat Aug 27, 2011 2:41 pm
Location: Ontario, Canada


Return to Concepts

Who is online

Users browsing this forum: No registered users and 13 guests

Hosted by Arvixe Web Hosting