Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#8792 closed enhancement (fixed)

Function `add_meta` to add meta tags similar to existing `add_link`

Reported by: Martin Scharrer <martin@…> Owned by: Martin Scharrer <martin@…>
Priority: normal Milestone: 0.12
Component: web frontend Version: 0.11.5
Severity: minor Keywords: meta tag
Cc: paul@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

While trac.web.chrome provides the functions add_link, add_stylesheet and add_script to add link and style tags to the webpages, there is no function nor template code to add meta tags. I detected this while working on the new version of my th:GoogleWebmasterVerifyPlugin which would have to add a special meta tag.

This functionality can be easily added and I do not know any reason why meta tags should be not permitted. Please find attached a tested patch for web/chrome.py and template/layout.html.

Attachments (2)

addmetatag.patch (2.1 KB ) - added by Martin Scharrer <martin@…> 15 years ago.
Patch against v0.11.5 to add the function add_meta plus the necessary template code
addmetatag.2.patch (19.5 KB ) - added by Martin Scharrer <martin@…> 15 years ago.
Patch against v0.11.5 to add the function add_meta plus the necessary template code

Download all attachments as: .zip

Change History (7)

by Martin Scharrer <martin@…>, 15 years ago

Attachment: addmetatag.patch added

Patch against v0.11.5 to add the function add_meta plus the necessary template code

by Martin Scharrer <martin@…>, 15 years ago

Attachment: addmetatag.2.patch added

Patch against v0.11.5 to add the function add_meta plus the necessary template code

comment:1 by Martin Scharrer <martin@…>, 15 years ago

My apologies, the addmetatag.patch is by accident reversed. I added a corrected version as addmetatag.2.patch but forgot to delete the 'Binary files … differ' etc. messages.

comment:2 by Paul Howarth <paul@…>, 15 years ago

Cc: paul@… added

comment:3 by Christian Boos, 15 years ago

Milestone: 0.12
Owner: set to Christian Boos
Severity: normalminor

comment:4 by Remy Blank, 15 years ago

Resolution: fixed
Status: newclosed

Slightly simplified patch applied in [8951], together with a unit test. Thanks!

comment:5 by Remy Blank, 15 years ago

Owner: changed from Christian Boos to Martin Scharrer <martin@…>

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Martin Scharrer <martin@…>.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Martin Scharrer <martin@…> to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.