From: Reini U. <ru...@x-...> - 2004-08-26 17:51:55
|
Which syntax should we use for template vars? CreatePage lets you create new pages, with the optional template argument, which prefills a page with content. The new CreatePage version will also allow arbitrary variables to be passed to CreatePage, which should also be possible via the more beatiful WikiFormRich plugin (editbox, pulldowns, checkboxes, ...). Something like: "CreateRestaurant" action page: <?plugin CreatePage template=Templates/Restaurant vars="location=New York&type=exclusive&rating=5" ?> And at any other page: Create new restaurant: <?plugin WikiFormRich action=CreateRestaurant editbox[] name=name editbox[] name=location pulldown[] name=type value="exclusive,cheap" pulldown[] name=rating value="1,2,3,4,5" textarea[] name=comment ?> The vars for the new page given in name will then be filled with the given args. Template syntax --------------- My current version has "%variable%" Mediawiki uses "{{{variable}}}" We also had "%%variable%%" and "%%%variable%%%" in the 1.2.x branch. So it will probably be "%%variable%%". %%% would clash with the line break syntax. Any opinions? Sample ------- pagename=Vorlage%2FNeuerFilm; [Land/%land%] [Jahr/%jahr%], %director% [http://xarch.tu-graz.ac.at/home/rurban/film/img/star20.gif] %%% [MRQE:%pagename% (%jahr%)] [IMDB:%pagename% (%jahr%)] Kategorie: [Preview%jahr%] -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |