Single page dashboard editing interface w/ stored attributes
Permalink
I have reviewed the Example FAQ package How To (http://www.concrete5.org/documentation/how-tos/developers/build-a-single-page-powered-editing-interface-for-concrete5/) and I understand the concept behind how that all works. However in that example the only information being entered is for page attributes that already exist (page title, description). My question is, how can I add a handful of additional attributes and how are those stored? It doesn't seem that page attributes is the best way, so I'm guessing the only other way is to create a db table specifically tied to this editing interface?
Basically, in the end I want a single page form in the dashboard that a user can fill out with a bunch of information and then have a page created with that data on the front end in a layout I can manipulate. Any suggestions or information someone can point me towards would be much appreciated.
Basically, in the end I want a single page form in the dashboard that a user can fill out with a bunch of information and then have a page created with that data on the front end in a layout I can manipulate. Any suggestions or information someone can point me towards would be much appreciated.
I to am looking for similar information. Please post if you have found an answer.
I do this kind of thing quite frequently. I like to build interfaces for my clients and do it exclusively with page attributes.
Here is my work flow:
Create a new page type for your resulting page. I'll call my page "property". Now create new page attributes for everything you need like, bedrooms, bathrooms, square feet, etc. do this as logically das you can. Use text areas, integers, radio buttons... Whatever makes sense.
Now add all the associated attributes to the default page type "property". That way, these pages will automatically have the required elements.
now create a single page for creating and editing this page type.. the view will be responsible for rendering all of the appropriate page attributes.. And prefilling the inputs if you are editing an existing page.
The controller will be responsible for adding, editing, and validating form inputs.
I use a " get" parameter to pass a page id when I want the single page to act as an editor, THE ABSENCE of a valid page id puts the page into the "new" mode. If a valid page id is passed, have concrete 5 check to make sure the current user has permission to perform the edits, then use the loaded page object to pull existing values for display in the form.
The controller takes any input passed and either creates a new page, or edits the existing one.
Obviously, my explanation lacks a lot of detail, but this general method works well. It allows you to keep your attributes centralized for quick editing, and you get the advantage of input data persistance in the event of validation failure.
You can also display your attributes with ease, on the created page type "property", and you can now use the powerful sorting and filtering features when using page lists etc.
Guy
Here is my work flow:
Create a new page type for your resulting page. I'll call my page "property". Now create new page attributes for everything you need like, bedrooms, bathrooms, square feet, etc. do this as logically das you can. Use text areas, integers, radio buttons... Whatever makes sense.
Now add all the associated attributes to the default page type "property". That way, these pages will automatically have the required elements.
now create a single page for creating and editing this page type.. the view will be responsible for rendering all of the appropriate page attributes.. And prefilling the inputs if you are editing an existing page.
The controller will be responsible for adding, editing, and validating form inputs.
I use a " get" parameter to pass a page id when I want the single page to act as an editor, THE ABSENCE of a valid page id puts the page into the "new" mode. If a valid page id is passed, have concrete 5 check to make sure the current user has permission to perform the edits, then use the loaded page object to pull existing values for display in the form.
The controller takes any input passed and either creates a new page, or edits the existing one.
Obviously, my explanation lacks a lot of detail, but this general method works well. It allows you to keep your attributes centralized for quick editing, and you get the advantage of input data persistance in the event of validation failure.
You can also display your attributes with ease, on the created page type "property", and you can now use the powerful sorting and filtering features when using page lists etc.
Guy
Can you create a page that would load every single attribute instace on it? Can you iterate through all of your properties (attributes) and display them in a list?
I'm trying to make a sort of family tree structure. My user will need to be able to plug all the info into the back end (Name, Parent, Pic, etc...) for each person. Then the front end will have a single page that retrieves the info and styles it via javascript. There will be hundreds of entries. Is using page attributes still a viable option?
I'm trying to make a sort of family tree structure. My user will need to be able to plug all the info into the back end (Name, Parent, Pic, etc...) for each person. Then the front end will have a single page that retrieves the info and styles it via javascript. There will be hundreds of entries. Is using page attributes still a viable option?