Submitted by : simon at: 2003-10-26T21:32:12+00:00 (14 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

There are many include mechanisms implemented for moin moin, some are quite complicated. Rather than letting the perfect be the enemy of the good, I propose adding a very simple, non-parameterized version:

[Include MyWikiPage]?

includes the text for MyWikiPage? in this paragraph. We can keep things very very simple. For example, making no attempt to do anything special for included pages that have different formatting rules than the including page. At a minimum, though, we would want to detect cycles. Here is one example from moinmoin

http://twistedmatrix.com/users/jh.twistd/moin/moin.cgi/macro_2fInclude_2epy

obviously not usable as is..

Thanks, --Craeg Strong cstrong@arielpartners.com

related thoughts --DeanGoodmanson, 2003/07/07 18:25 GMT reply

Craeg, your thoughts on how this might inter-work with a semi-standard through-the-wiki API mechanism would be appreciated. See: PluginAPIDiscussion

this makes sense, as the current version relies on dtml, which covers a majority of the cases, but this will quickly dwindle with the adoption of reStructuredText

related thoughts --2003/07/08 03:35 GMT reply

I think the plugin API could start out extremely simple. See thoughts on PlugInAPIDiscussion

update --simon, Sun, 28 Nov 2004 02:33:59 -0800 reply

There is a convenience method you can use if DTML is enabled: dtml-var "include(pagenameorid)". This renders the named page inline without skin, taking care of authentication etc. Our next step should be to add a simple (non-DTML) syntax for calling scripts defined in the scripts/ subfolder - a more safe way for an admin to provide dynamic features to users, requested on ubuntu-doc list.

details --simon, Tue, 13 Sep 2005 14:42:36 -0700 reply

(12:22:13) sm: it would be allowed in all page types, I guess
(12:23:21) sm: <zwikiscript "include('AboutZopeWiki',show_subtopics=0)"> ?
(12:23:28) ***sm cringes at inventing new tags
(12:24:11) d2m: thats hard, i know
(12:25:26) d2m: but what would [include AboutZopeWiki] buy you ? isn't the  [] notation used in WikiWikiWeb ?
(12:25:44) sm: but people want safer macros, so no problem.. "zwikiscript is equivalent to the dtml-var tag but calls only scripts in ZWiki/scripts.. these are (external methods ? pythonscripts ?)"
(12:26:43) d2m: ok, zwikiscript btw sounds great
(12:30:25) sm: "zwikiscript is equivalent to the dtml-var tag but calls only scripts in ZWiki/scripts (dtml methods, page templates, pythonscripts or external methods) or methods of the current page"
(12:30:51) d2m: i think that would be a great start, really
(12:30:54) sm: maybe just a way to call page methods would be enough ? no, guess not
(12:31:32) sm: and scripts/ should be in the zodb.. and the fs, for defaults ?
(12:32:22) d2m: a way to let people use all the public zwiki methods (there are lots of them)
(12:33:53) sm: or <zwiki-var ...>
(12:34:07) sm: <zwiki-call ...>

No, "zwikiscript works like the dtml-var tag but calls only 1. (selected public api ?) methods of the page object or 2. objects in a scripts/ folder in the zodb (can be acquired): dtml methods, page templates, pythonscripts, external methods etc. If the named script is not found in one of those places the tag is ignored. (?)"