Single Pages and Controllers
Permalink
Hi All
I guess I am either looking at this wrong or somehow over complicating my understanding of Single Pages and possibly Controllers.
Here is what I would like to do:
1. Create a page that will allow a contributor to enter a recipe. I have the form made but it goes no where at this point because the creation of single pages hasn't happened.
2. Create a page with a search block. I have this but it won't return anything because the single pages aren't being created and the search block only searches pages.
3. Create a search display page. I have that made but am unsure whether I need to have a content block to list the items in or not. Maybe even have it as an RSS feed with mini-description. Not sure.
Because I know how to do this in a non-cms context, I think I am having an issue on the data flow. Please correct me if I am wrong about this:
1. Create a recipe should create a "Single Page" with the recipe name as the title. This will go in the /recipe folder. Regardless on how I create the page (or maybe this is the controller logic I am not getting) the data from the form should go immediately to the page in a specific layout. Then that page will be registered in the db as a PAGE not stripped in data sets.
2. When I select the Search Recipe Page, this will search the INDEXED sitemap and specifically go to the Recipe folder and search the pages created there. This will then go to --
3. The Search Results page will display the list of pages with the searched keywords with a link to each page. This list being generated by the "search block".
Now, tho I am glad I do not have to create complex query searches and complex php pages, that logic I can understand. I am getting stuck on how the controller works. It has a bunch of functions that I don't know what they are doing or when/if they are called. I am still new enough to PHP to get easily confused. I know what I want to do, but I am unsure how to do it correctly in Concrete5.
Hopefully someone that will be patient with me can tell me in easy layman's terms exactly the route I should take on this.
Thanks
From a NOOB
I guess I am either looking at this wrong or somehow over complicating my understanding of Single Pages and possibly Controllers.
Here is what I would like to do:
1. Create a page that will allow a contributor to enter a recipe. I have the form made but it goes no where at this point because the creation of single pages hasn't happened.
2. Create a page with a search block. I have this but it won't return anything because the single pages aren't being created and the search block only searches pages.
3. Create a search display page. I have that made but am unsure whether I need to have a content block to list the items in or not. Maybe even have it as an RSS feed with mini-description. Not sure.
Because I know how to do this in a non-cms context, I think I am having an issue on the data flow. Please correct me if I am wrong about this:
1. Create a recipe should create a "Single Page" with the recipe name as the title. This will go in the /recipe folder. Regardless on how I create the page (or maybe this is the controller logic I am not getting) the data from the form should go immediately to the page in a specific layout. Then that page will be registered in the db as a PAGE not stripped in data sets.
2. When I select the Search Recipe Page, this will search the INDEXED sitemap and specifically go to the Recipe folder and search the pages created there. This will then go to --
3. The Search Results page will display the list of pages with the searched keywords with a link to each page. This list being generated by the "search block".
Now, tho I am glad I do not have to create complex query searches and complex php pages, that logic I can understand. I am getting stuck on how the controller works. It has a bunch of functions that I don't know what they are doing or when/if they are called. I am still new enough to PHP to get easily confused. I know what I want to do, but I am unsure how to do it correctly in Concrete5.
Hopefully someone that will be patient with me can tell me in easy layman's terms exactly the route I should take on this.
Thanks
From a NOOB
(*) thru the dashboard sitemap, create a recipes page, this will essentially be the "folder" for subsequent recipes created.
(*)on the "recipes" page add a 'page list' block, and set its path to be 'pages below this one'. that will give u a listing of only recipes when a user lands on the page.
(*) the search function is a 2 part process. (a)create a page thru the dashboard/sitemap, for the name/title give it the name you want ur search page to have, set it to "exclude from nav" if you dont want user simply navigating to it.
Lastly for this page, edit it and add a search block. this will display the results when a search is directed to the page.
(b)whatever page(s) you would like the user to search from, add a search block, tick "Post to Another Page Elsewhere", then enter the path to the page you want it to post to.
(*) For the creation of recipe pages id suggest each recipe be made a page, insert a content block with the recipe and that would be it.
or
(*) create your own block, create a "submit a recipe" page with the block as content. once the block is submitted, have it create a page, with a content block with the information formatted whatever way you see fit.
There are other ways to go about what i have said above, but that is the easiest way i can think of at the moment.