[MAGNOLIA-887] Introduction of selectors in url Created: 18/May/06  Updated: 23/Jan/13  Resolved: 14/Jul/06

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 3.0 Beta 1
Fix Version/s: 3.0 RC3

Type: Improvement Priority: Major
Reporter: Ralf Hirning Assignee: Philipp Bärfuss
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File selector.patch.txt    
Issue Links:
relation
is related to MAGNOLIA-528 Enhance subtemplating to selected tem... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

It would be nice to allow selectors in URLs. Selectors are the parts between the path (handle) and the extension.
The idea is to pass additional parameters to the template within the URL (not using page.html?X=1 ...) so that the result can be cached.
The template can decide what to do with these parameters.
Examples:
http://localhost/site/form.thanks.html to give feedback to a form
http://localhost/site/page.en.html to render a page with English texts
http://localhost/site/page.de.html to render a page with German texts
http://localhost/site/page.w-170.h-80.jpg to create a graphic with width 170 px and height 80px

The selectors could be provided via API function
Iterator Resource.getSelectors()



 Comments   
Comment by Ralf Hirning [ 14/Jul/06 ]

I attached a patch to allow the usage of selector. The changes are:

  • Add static final String SELECTOR = "selector" in class Aggregator
  • Add static String getSelector(HttpServletRequest req) in class Resource
  • Modify MgnlCmsFilter.collect(HttpServletRequest request) to extract the selector and store as request attribute
Comment by Philipp Bracher [ 14/Jul/06 ]

applied. nice feature.

Thanks!

Generated at Mon Feb 12 03:21:35 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.