Post by alan_82 » Sun Jan 06, 2013 8:14 pm

Hi everyone,

I'm tryng to create a new layout based on the information page layout, so i can add help section to my site.
The page will have a with a hard coded sidebar list of custom pages in the left columns, and free html in the centre.

I've got so far as:

1. Copying & editing the following files:
controller/information/information.php -----> copied & renamed to help.php
Then inside the file replaced all instances of 'information/information' with 'information/help'
Also on line 2 renamed 'ControllerInformationInformation' to 'ControllerInformationhelp'

language/english/information/information.php -----> copied & renamed to help.php
view/theme/default/template/information/information.tpl -----> copied & renamed to help.tpl, and added my hardcoded sidebar.

2. Adding the layout in the backend:
System > Design > Layouts > Insert
Layout Name = help
Route = information/help


Result:
The default information page layout still loads, can anyone tell me what i'm missing please?
I'd really appreciated some pointers

Thanks

Alan

Newbie

Posts

Joined
Mon Jul 30, 2012 1:35 am

Post by bibblyb » Mon Jan 07, 2013 2:36 am

I've got precisely the same problem, any kindly people out there got any advice? :D

Rhys

Newbie

Posts

Joined
Thu Aug 02, 2012 11:14 pm

Post by ChetanCx » Mon Jan 07, 2013 3:11 am

alan_82 wrote: The default information page layout still load,
Alan
what are you clicking on and expecting your new layout to show ??
from admin panel go to Catalog>> information >>insert
in this page set layout override to "Help" (in design tab).

User avatar
Active Member

Posts

Joined
Sat Dec 08, 2012 8:12 pm

Post by alan_82 » Mon Jan 07, 2013 3:16 am

Hi ChetanCX,

Thanks for helping on this one, I wish that was the problem :)
The "Help" layout has been selected as a layout overide, but unfortunately it doesn't seem to make a difference.

Newbie

Posts

Joined
Mon Jul 30, 2012 1:35 am

Post by ChetanCx » Mon Jan 07, 2013 3:21 am

attach the files may be you missed something in code...

User avatar
Active Member

Posts

Joined
Sat Dec 08, 2012 8:12 pm

Post by alan_82 » Mon Jan 07, 2013 3:44 am

Hi ChetanCX,

Please see the attached files, i've packaged them using the same folder structure i've used online.
Thanks again for your help

Alan

Newbie

Posts

Joined
Mon Jul 30, 2012 1:35 am

Post by ChetanCx » Mon Jan 07, 2013 5:54 pm

i don't have much knowledge of layout but i think you are overestimating power of layout.
first thing first your layout is working and loading too. for example go to modules and set category module on help layout on content_top and reload the page (in which you set layout override to help ) you will see category module on top. and actually for this you don't have to set the route of layout "help".

then why your self made sidebar is not working??
open page yourwebsite/index.php?route=information/help&information_id=5
note:changed information_id=4 if that does not work.
you will see your home made side bar.

Conclusion: i think layout is not meant use your controller or view files , it uses information's file and layout override is just if you want one of your information page to have modules placed according to layout

User avatar
Active Member

Posts

Joined
Sat Dec 08, 2012 8:12 pm

Post by alan_82 » Tue Jan 08, 2013 5:18 am

Hi ChetanCX,

Thanks for checking over the files, I really appreciate it.
I followed your instructions and observed the same results you described.

Whilst it wasn't working as I hoped you put me on the right path:

I changed the content of my help.tpl to be the same as the information.tpl
and then instead of trying to hard code the sidebar, I installed a vqmod which allowed me to add my HTML sidebar as module to the left column of pages assigned to the 'help' layout.

Link to vqmod:
http://www.opencart.com/index.php?route ... load_id=29

Thanks again for looking into it for me, i'm really happy its working now.
Whilst I still dont have a full grasp of opencart, im one step closer!

Alan

Newbie

Posts

Joined
Mon Jul 30, 2012 1:35 am

Post by buffalo » Thu Jul 14, 2016 10:14 pm

I help,

Im trying to target a module to open on the information pages, but not them all just one, what is the route.

information/information&information_id=11

is the route i want my module to start on but for some reason it does want to load, but if i change the route to infomation/information it loads perfect but on all pages.

Please Help Guys!


??? ??? ??? ??? ??? ???

Newbie

Posts

Joined
Thu Jul 14, 2016 10:05 pm
Who is online

Users browsing this forum: No registered users and 65 guests