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
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
what are you clicking on and expecting your new layout to show ??alan_82 wrote: The default information page layout still load,
Alan
from admin panel go to Catalog>> information >>insert
in this page set layout override to "Help" (in design tab).
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
Please see the attached files, i've packaged them using the same folder structure i've used online.
Thanks again for your help
Alan
Attachments
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
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
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
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
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!

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!






Who is online
Users browsing this forum: No registered users and 97 guests