Trails

Make it possible to relocate Trails pages under a different path

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 2.0.0
  • Fix Version/s: None
  • Component/s: trails-core
  • Labels:
    None
  • Environment:
    any
  • Number of attachments :
    0

Description

Rather than hard-coding pages in the templates, might be better to inject them in the backing Java classes. This way it'd be easier to move List, Edit and New for example under /admin/ directory/url

Activity

Hide
Alejandro Scandroli added a comment -

Kalle, can you elaborate on this? How do I inject the templates in the Java classes?

Show
Alejandro Scandroli added a comment - Kalle, can you elaborate on this? How do I inject the templates in the Java classes?
Hide
Kalle Korhonen added a comment -

Yes, earlier I was thinking about just injecting the required pages into classes and referring to them in the templates with e.g. <t:pagelink page="prop:Show"/> rather than the literal, but the usage is more widespread than that (in components, blocks etc). We could also create some service to specify the class name for Trails pages but that might be overly complicated. Perhaps the simplest solution is to put them in pages/trails/ and then contribute default URL rewrite rules that map them to /* but allow user to override (didn't try if this is technically feasible - just an idea).

Show
Kalle Korhonen added a comment - Yes, earlier I was thinking about just injecting the required pages into classes and referring to them in the templates with e.g. <t:pagelink page="prop:Show"/> rather than the literal, but the usage is more widespread than that (in components, blocks etc). We could also create some service to specify the class name for Trails pages but that might be overly complicated. Perhaps the simplest solution is to put them in pages/trails/ and then contribute default URL rewrite rules that map them to /* but allow user to override (didn't try if this is technically feasible - just an idea).

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: