Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#3053 closed enhancement (wontfix)

Apply a template to included regions

Reported by: djs52 Owned by: coderanger
Priority: normal Component: IncludeMacro
Severity: normal Keywords:
Cc: Trac Release: 0.10


The attached patch applies a ClearSilver template to the result of IncludeMacro to make it easier to add things like a direct "edit" link for included wiki pages. I've included a .cs file which does this when the current user has WIKI_MODIFY, and a .js file which highlights the region that will be edited (credit to cjfn@… for the JavaScript, used with permission).

Attachments (1)

includemacro.diff (4.9 KB) - added by djs52 7 years ago.

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by djs52

comment:1 Changed 7 years ago by coderanger

  • Resolution set to wontfix
  • Status changed from new to closed

This is far too specific to ever be included in the macro. I already use the modular mimeview API, so you could rework this as an IHTMLPreviewRenderer.

comment:2 Changed 7 years ago by djs52

I thought I had done this is a particularly generic way, so I'm surprised that you think it is too specific. Would you consider a simpler version with similar code changes but no javascript and a very basic template (e.g., just <? var:include.page_html ?>). Behaviour would be unchanged from the existing macro, but it would make it possible for users to override the template on a per-project basis to add things like the edit links.

comment:3 Changed 7 years ago by coderanger

For starters, ClearSilver is not used in 0.11 (where any new features would be added). Second, this only makes sense on the wiki include format, thus making it not generalized. Third, this would be pretty trivial to make into its own plugin, so I see no reason to add it.

Add Comment

Modify Ticket

as closed The owner will remain coderanger.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.