dreamingmind / bindery

CakePHP 1.3 Based Dreaming Mind Bindery Site
2 stars 2 forks source link

Workshop Detail Pages #126

Open dreamingmind opened 11 years ago

dreamingmind commented 11 years ago

This can leverage output code strategies from:

Since all three are presentations of Content records, any will work. But Blog Articles seem most appropriate to the workshops.

So, as a tentative plan, a detail could be the feature block re-purposed for the top of the page. Then the remaining Content records in a scrolling column just like a blog article.

By using the same page tag structure, all the image-zoom and content edit tools should work just like blog also. A new stylesheet will give it a white-background look to make it match the main site rather than the blog.

dreamingmind commented 11 years ago

For a url:

 http://bindery/workshops/wokshop-title-slug

Where 'workshop-title-slug' is from the Content.slug field. But this simple case is not the whole story as it turns out. I've collected workshops into arbitrary groups to organize the menu choices a bit. This is exactly the pattern I followed for the Art & Editions section and code from that action can be moved to appController for reuse.

The new url's follow this pattern:

http://bindery/workshops/some/arbitrary/categorization/workshop-title-slug

so the final entry is always the title and the other segments identify menu-nest nodes. When the user clicks one of the category nodes that is not an article, Category descriptive text is shown and articles that are descendents of that node are show and links on the page. (see the operation of the art section for the behavior pattern).

curlyjason commented 11 years ago

With editing ability for admins.

dreamingmind commented 11 years ago

The url parsing code has been extracted to appController and can be reached at $this->expandShortUrl().

This code will always build the proper url path and expand the menu to reveal the article. It will also insure $this->params['pname'] contains the slug (so ['pass'][0] is now wrong).