#3053 closed enhancement (wontfix)
Apply a template to included regions
Reported by: | Dan Sheridan | Owned by: | Noah Kantrowitz |
---|---|---|---|
Priority: | normal | Component: | IncludeMacro |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.10 |
Description
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)
Change History (4)
Changed 17 years ago by
Attachment: | includemacro.diff added |
---|
comment:1 Changed 17 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 Changed 17 years ago by
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 17 years ago by
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.
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
.