ccornell - OpenOffice.org wrote:
OK, done, but I added the link by hand, instead of just adding the
template to the new page. The license template(s) add the page to the
category. Doing that to a category page, IIRC, is a wiki no-no.
The one thing you need to try and avoid is loops... a template referring
to itself for example.
My natural instinct is to dig into the License and Usage templates, so
that they generate a parameter for their offspring to use, something
like "CatPage" or "NoCat", which would:
(a) produce documentation on the child template's page;
(b) have documentation on the Usage page;
(c) when used, as {{license-name|CatPage}} on the Category page, would:
(1) not add the Category page to the category, and
(2) add a fixed statement like, "Pages are placed in this category by
the {{license-name}} template."
The idea is to simplify adding a license, but: would I just be adding
to the complexity, and really making things harder, by doing this?
There are a few things around that we can use... but I'm not 100% sure I
follow you train of thought here... There is an extension
installed/available that allows us to insert boilerplate text into a page.
We can always give it all a try on a test page and see how it works.
C.
Please excuse the frequent lack of clarity; I tend to think directly in
code, and lose things in translating to English.
What I am proposing is to modify the two generator templates, to produce
the following results. All documentation is shown as it should appear on
the relevant page, without any of the wiki markup (doubtless
fantastically complex) needed to produce it. (I may need to use a lot of
"&something;" HTML character entities.)
* New documentation on the Template:Usage page: "Place the generated
template, {{your-license}}, on the proper Category page, using the
'CatPage' parameter: {{your-license|CatPage}}."
Given a hypothetical {{PDL2}} generated template, with a category "PDL
Version 2 License" and a link to "PDL2.html":
* New documentation on the Template:PDL2 page is particularized: "Place
this template on the [[Category:PDL Version 2 License]] Category page,
using the "CatPage" parameter: {{PDL2|CatPage}} to produce the proper
documentation and to avoid including the category in itself." The double
brackets [[ ]] here indicate a real internal wiki-link, probably red to
start with. The braces {{ }} are escaped.
When {{PDL2|CatPage}} is placed on the Category page, the following will
happen:
* The Category page will /not/ be included in itself.
* In addition to the standard link ("Documentation on this page ..."), a
new line of documentation will be added: "Pages are placed in this
category by the {{PDL2}} template."
* The {{PDL2}} template will recognize the "|CatPage" parameter
specification and do the above.
Testing: Normally I would just test in preview mode, or in the Sandbox,
but this involves three new templates, and a new Category page, and
possibly a new "ordinary" page as well . . . If you approve of the
concept, I hope you don't mind having a few pages marked, {{delete}}
afterward. The template language is hugely complex and powerful; we have
barely scratched the surface of it. I am certain to make some mistakes
in the process. Playing on my "own" pages should avoid disrupting
anything on the wiki.
--
T. J. Frazier
Melbourne, FL
(TJFrazier on OO.o)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@documentation.openoffice.org
For additional commands, e-mail: dev-h...@documentation.openoffice.org