Several templates use non-existent 'absolute_url' #167

Closed
opened 2023-09-09 16:30:52 +00:00 by davmo · 1 comment
Collaborator

Calls to absolute_url can be found in templates:

templates/content-about.tpl.html
templates/content-recording.tpl.html
templates/content-request_a_slot.tpl.html
templates/content-requested_topics.tpl.html
templates/page.tpl.html

Typical usage is:

<a href="<!--% absolute_url(baseurl) %-->about.html#about">About HPR.</a>

Variable baseurl is from the site.cfg configuration file, but using it in this non-existent macro (?) causes the relative URL to be preceded by nothing.

Possible solution: write a macro absolute_url for concatenating the base URL and the relative part.

This could also be achieved by defining a vmethod based around the module URI, which contains many URL manipulating methods, but the macro method will not require a new module to be added.

Calls to `absolute_url` can be found in templates: ``` templates/content-about.tpl.html templates/content-recording.tpl.html templates/content-request_a_slot.tpl.html templates/content-requested_topics.tpl.html templates/page.tpl.html ``` Typical usage is: ``` <a href="<!--% absolute_url(baseurl) %-->about.html#about">About HPR.</a> ``` Variable `baseurl` is from the `site.cfg` configuration file, but using it in this non-existent macro (?) causes the relative URL to be preceded by nothing. Possible solution: write a macro `absolute_url` for concatenating the base URL and the relative part. This could also be achieved by defining a `vmethod` based around the module `URI`, which contains many URL manipulating methods, but the macro method will not require a new module to be added.
davmo added the
Bug Found
label 2023-09-09 16:31:05 +00:00
Author
Collaborator

Changes made using a macro. Slight snafu with the Pull Request but the changes have now been merged.

Closing this issue.

Changes made using a macro. Slight **snafu** with the Pull Request but the changes have now been merged. Closing this issue.
davmo closed this issue 2023-09-09 22:47:13 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: rho_n/hpr_generator#167
No description provided.