Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Issues to be considered

Design

First we will introduce one new db column to the webpage database table named "action". During the upgrade process all existing 'Weblog' templates will be updated to action "weblog" while all other pages will be given action "custom". Then moving forward we can add support for any new actions we need. This will be the only change required in the data model.

  • Templates which are used for specific actions will always have a standardized name, description, and link, so those things cannot be controlled by users. This will behave the same way the current standardized templates (Weblog, _day, _css, _decorator) do, where users may not edit the name, description, or link value for that template.

For changes to the rendering system the WeblogPageRequest will be updated to be capable of extracting an "action" based on the request url parsing. this can be accessed and used by the PageServlet (or other servlets) to make the right choice of template to lookup for rendering. if the individaul template for an action is not found then we either use the default Weblog template (search) or respond with a 404 (tags index) depending on how the functionality works now.

We can optionally define new Model objects to provide methods which are targeted for use specifically on the various action templates. The best example is how there is a specific SearchResultsModel to be used for displaying search results.

  • We can build on this portion of the design after defining exactly what custom actions will be supported and whether or not those actions would benefit from a custom Model.

On the publishing UI the template editing section would remain mostly the same except that the templates list would be changed to highlight those templates which are attached to specific actions. This would be done by something simple like putting these templates at the top of the list and highlighting them in a different color, or something to that effect. This gives us the chance to provide focus to Roller's main templates and hopefully improve the usability of the template editing experience.

Also, the "add page" action will be updated to include a drop down list of potential action pages which can be created. if a weblog already has a template for a specific action then it will not show up in the list. the default option will be "custom" which creates a custom template to live under "/page/*" just as the current functionality works.

Any new urls which will be enabled to support a new template action will require some updating in the url mapping process and servlets. An example would be the tags index page (weblog/tags/) which currently is not supported and returns a 404 page.

Proposed Actions to Support

...