This was something I saw in Website Baker and wanted to add to opencart. When creating pages in WSB you can choose the "type" of page it is (wysiwyg, code, faq, etc). They actually have this extensible so that you can create new types as modules and choose from custom module templates. So wysiwyg loads the wysiwyg editor, form loads the form designer, faq loads a Q&A designer, etc.
While that would be ideal to have a system like that in OC, for now I wanted to add a simple modification to allow "code" type to be used for information pages. This means that you can actually have different content show based on what conditions you setup. Dynamic Information pages!
So I did it.
Check my DEMO.
It simply shows whether you are logged in or not.
You can login with demo@demo.com/demo and see the message change again when you log back out.
This is just a simple example but much more can be achieved and the code change is quite simple.
This is how it looks in the admin:
http://www.screencast.com/users/DssTrai ... 5f621ae683
I'm going to play with it more and perhaps release it as a mod but I'd like to put it into the core as well at some point. Perhaps with an updated php syntax editor like this:
http://codepress.sourceforge.net/index.php
or
http://www.lostintechnology.com/interne ... -on-the-go
While that would be ideal to have a system like that in OC, for now I wanted to add a simple modification to allow "code" type to be used for information pages. This means that you can actually have different content show based on what conditions you setup. Dynamic Information pages!
So I did it.
Check my DEMO.
It simply shows whether you are logged in or not.
You can login with demo@demo.com/demo and see the message change again when you log back out.
This is just a simple example but much more can be achieved and the code change is quite simple.
This is how it looks in the admin:
http://www.screencast.com/users/DssTrai ... 5f621ae683
I'm going to play with it more and perhaps release it as a mod but I'd like to put it into the core as well at some point. Perhaps with an updated php syntax editor like this:
http://codepress.sourceforge.net/index.php
or
http://www.lostintechnology.com/interne ... -on-the-go
Yes, that is what I like about WB to!
Plus you can mix pages of a different kind and even change the order in which they appear.
Plus you can mix pages of a different kind and even change the order in which they appear.
Norman in 't Veldt
Moderator OpenCart Forums
_________________ READ and Search BEFORE POSTING _________________
Our FREE search: Find your answer FAST!.
[How to] BTW + Verzend + betaal setup.
looks interesting unfortunately that first linked highlighter does not work in chrome.
I like the idea of being able to put code into the pages from a usability perspective, but the little security minded voice in the back of my head kind of screams eval() NOOOOO!
I like the idea of being able to put code into the pages from a usability perspective, but the little security minded voice in the back of my head kind of screams eval() NOOOOO!
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
I'm all for the form and FAQ designer. It would be great if we could use the form designer on the contact us page so we could create our own custom contact us form easily.Qphoria wrote:form loads the form designer, faq loads a Q&A designer, etc.
The FAQ form designer would be great too of course.
Look forward to it!
Hi.Qphoria wrote: ↑Wed Dec 01, 2010 1:29 amThis was something I saw in Website Baker and wanted to add to opencart. When creating pages in WSB you can choose the "type" of page it is (wysiwyg, code, faq, etc). They actually have this extensible so that you can create new types as modules and choose from custom module templates. So wysiwyg loads the wysiwyg editor, form loads the form designer, faq loads a Q&A designer, etc.
While that would be ideal to have a system like that in OC, for now I wanted to add a simple modification to allow "code" type to be used for information pages. This means that you can actually have different content show based on what conditions you setup. Dynamic Information pages!
So I did it.
...
I would like to insert php code into my info pages, in Opencart 3.01, is it possible?
Can you help me with this question?
Thank you.
You could try this free Mod:
OpenCart Template Switcher
https://www.opencart.com/index.php?rout ... n_id=31589
---
or then, you could try this:
https://php2twig.com/
---
Ernie
OpenCart Template Switcher
https://www.opencart.com/index.php?rout ... n_id=31589
---
or then, you could try this:
https://php2twig.com/
---
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Sorry, I did not understand your suggestion (but thank you anyway).
The information pages of Opencart 3.0 are not files, but their code is registered in a table called "information_descriptions".
When I enter a code directly into the registry, for example:
<? php echo "Hello wolrd!"?>
The system replaces:
<! - <? php echo "Hello wolrd!"?> ->
And the page does not "spin" the code. I need a way to insert code into these pages in order to avoid this. Be PhP, be javascript.
According to Qphoria he managed and placed a new item in the information pages that allows you to choose the format.
http://www.screencast.com/users/DssTrai ... 5f621ae683
Thank you
The information pages of Opencart 3.0 are not files, but their code is registered in a table called "information_descriptions".
When I enter a code directly into the registry, for example:
<? php echo "Hello wolrd!"?>
The system replaces:
<! - <? php echo "Hello wolrd!"?> ->
And the page does not "spin" the code. I need a way to insert code into these pages in order to avoid this. Be PhP, be javascript.
According to Qphoria he managed and placed a new item in the information pages that allows you to choose the format.
http://www.screencast.com/users/DssTrai ... 5f621ae683
Thank you
Who is online
Users browsing this forum: No registered users and 26 guests