3 users online. Create an account or sign in to join them.Users
Question about extension and attaching DS to a page
This is an open discussion with 12 replies, filed under General.
Search
Not sure but most probably you can do an extension that hooks onto an event when the page is saved; and you can modify the data received by post? so you can add your data-source to the list if its not there.
Ahh post page save event.
Thanks for the tip.
I know Global Resource Loader is available but just wanted to know if there's a method to append the DS to the page in a sort of override to the Blueprints > Pages editor
You could use the same delegate that Global Resource Loader uses?
Aha!
Diggin in thar now. Thanks Nick.
Woha double postage! Chrome..
As crude as my PHP skills are, I've made progress with a static page extension: http://screenr.com/Epas
Adding the DS to the active page without user intervention is todays task... got a way to go yet, but started using it on a site in work! works like a charm for the client.
That's a great idea! Are you still able to reorder pages as you would in the Blueprints > Pages index?
YOu should be able to, it just doesn't do it yet.
The extension extends BlueprintsPages so I just need to plug that bit in I guess.
EDIT
I've just looked into the extension and I think the ajax re-ordering file isn't included... or being as the extension doesn't resolve the context specified in the ajax file, the re-ordering is not updated in the DB.. will clone the ajax file into the extension and see what happens!
EDIT2
Seems a bit trickier than first thought.. not too well versed in ajax and how symphony deals with it. It looks like the admin.js file has default calls to the ajaxorder.php file inside the symphony folder itself. If I try to re-create this file in the extension, I have the admin.js and my extension .js file loaded and there are still calls to the core js ajax function... looking at page_prototypes Jonas has just written his own js to do something similar, but it's not re-ordering... would appreciate a hand from someone who know Ajax and how Symphony deals with it TBH. My quest continues.
Hey Stephen,
It's very crude and needs cleaning up and debugging, but Page re-ordering now works! woop.
Thanks, Andrew. This could be a very useful approach to managing static pages.
It does need a lot of clean up, but the thought is there.. I am looking into a method of uncoupling the .xsl file from the page, so that we can reuse the template for other static pages.. so the user could pick a drop down of which xsl file they wanted to use.. i.e single column, blog style or something similar.. all work to be done, but fun times!
You should definitely chat to Jonas (klaftertief) and look at the page prototypes extension, which aims to do this. You configure a page prototype (a page with a set template and DSs attached) and allow other new pages to be spawned from this (clones or by reference). Give it a go.
Hi Nick, I've played around with it quite a bit and really like what it is doing. From a UX point of view I struggled with the spawn and create from convention at first, but get the idea now.
I'm not trying to duplicate what Jonas has done here either, it started as a means to understand the structure of an extension and just snowballed :)
Create an account or sign in to comment.
Helooo, So I've been playing with an extension and have params and a datasource made for it to output content from a textarea.
I'm having to manually attach the DS to each page in order to be able to use it in my pages.
Is there a method to attach a my Datasource called 'page-content' to every page without user intervention when they create new pages.?
I know Global Resource Loader is available but just wanted to know if there's a method to append the DS to the page in a sort of override to the Blueprints > Pages editor