SinglePage Woes
Permalink
How can I have a single page that is not wrapped in a view.php without creating a file in the theme folder?
I have a situation where I require a single page but I need the site owner to be able to install other themes without breaking this functionality.
I have a situation where I require a single page but I need the site owner to be able to install other themes without breaking this functionality.
Do you mean Single Page Website functionality?
I mean single pages as described here
http://www.concrete5.org/documentation/developers/pages/single-page...
http://www.concrete5.org/documentation/developers/pages/single-page...
Hmm. Right now it isn't possible. A single page is either wrapped in a theme's view.php or is completely overridden by including a file of the same name in the active theme.
Could you describe what you're looking for in a bit more detail? It may be possible with some tweaks to the core.
Could you describe what you're looking for in a bit more detail? It may be possible with some tweaks to the core.
good to hear from you Andrew....
As I typed out this question originally I was honestly thinking "this is probably a question directly for Andrew".
I will admit that what I am trying to do is a bit unorthodox and definitely outside of the scope of what C5 is designed for. The fact that I can use C5 at all is a testament to what an awesome platform you guys have built.
The site I am creating uses C5 as a site and front-end to a MLS system for real estate. The external system runs on the Django Python framework and makes data available over ajax calls. I have a single page that has a form that makes ajax calls for searching.
There is a well known limitation that you cant make ajax calls to another domain. However, the php server can make HTTP requests anywhere it wants. I have a page called gateway.php and the ajax calls are made to this page and then they are "re-routed" to the Django server.
This all works extremely well.....
However from within my gateway it would be nice to access certain "bells and whistles". Namely, but since its outside of the C5 structure, naturally, I don't have access to those classes.
I have worked around this for now by accessing the database directly.
So...
There are two ways around this that I can see.
1) Figure out a way to just include the Config class. Maybe not so easy, looks like it relies on several other libraries. You would probably be very helpful here Andrew.
2) Include it in the C5 Single Pages with some type of 'hack' to keep it out of view.php. The problem with this is that I don't need any other functionality. It would be nice to only load that which is actually needed. The site does runs fast, but I definitely want to keep a data gateway lean and as optimised as possible.
Thoughts?...
As I typed out this question originally I was honestly thinking "this is probably a question directly for Andrew".
I will admit that what I am trying to do is a bit unorthodox and definitely outside of the scope of what C5 is designed for. The fact that I can use C5 at all is a testament to what an awesome platform you guys have built.
The site I am creating uses C5 as a site and front-end to a MLS system for real estate. The external system runs on the Django Python framework and makes data available over ajax calls. I have a single page that has a form that makes ajax calls for searching.
There is a well known limitation that you cant make ajax calls to another domain. However, the php server can make HTTP requests anywhere it wants. I have a page called gateway.php and the ajax calls are made to this page and then they are "re-routed" to the Django server.
This all works extremely well.....
However from within my gateway it would be nice to access certain "bells and whistles". Namely
Config::get
I have worked around this for now by accessing the database directly.
So...
There are two ways around this that I can see.
1) Figure out a way to just include the Config class. Maybe not so easy, looks like it relies on several other libraries. You would probably be very helpful here Andrew.
2) Include it in the C5 Single Pages with some type of 'hack' to keep it out of view.php. The problem with this is that I don't need any other functionality. It would be nice to only load that which is actually needed. The site does runs fast, but I definitely want to keep a data gateway lean and as optimised as possible.
Thoughts?...
Check out tools, I think that is what you need.
Could you be more specific?
you could use a tools file, for example,
The Captcha image in forms is a tool,
http://www.concrete5.org/tools/required/captcha...
and the help button in the editing toolbar:
http://www.concrete5.org/tools/required/help...
UI translation for javascript:
http://www.concrete5.org/tools/required/i18n_js...
they are un-themed, and can basically do anything. I use them mostly for ajax
The Captcha image in forms is a tool,
http://www.concrete5.org/tools/required/captcha...
and the help button in the editing toolbar:
http://www.concrete5.org/tools/required/help...
UI translation for javascript:
http://www.concrete5.org/tools/required/i18n_js...
they are un-themed, and can basically do anything. I use them mostly for ajax