Feature Proposal: add $formfield to META{"parent"}
Motivation
(originally written in
HowToShowParentTopics)
I am creating a client extranet, with pages of my employer's project files. I have developed enough sensitivity for clients, client and project managers that I understand they don't want to see their company names and projects mangled into obscure programming-like page names.
So I've added a webform to each client page that sets the page title. Filling of the names is done automatically. Now I want to show them in the homeward/breadcrumb path.
Description
Combining
META{"parent"} syntax with
FORMFIELD syntax is not working. Therefore I have added a new parameter to
META{"parent"} (see attached patch).
Impact and Available Solutions
You add
formfield="a form field name" as parameter, and in the format parameter (use patch above) you add
$formfield.
If you don't use the formfield parameter, this won't take much performance. But someone with a keen eye on regexes may scrutinize the proposed code.
--
ArthurClemens - 16 Sep 2004
Note: Patch is attached as
https://twiki.org/p/pub/Codev/AddFormfieldParamToMetaParent/render_parent_with_formfield_variable.patch. The patch is against the
TWikiAlphaRelease of
15 Feb 2004.
Documentation
forthcoming
Examples
The homeward path was created like this:
<div class="twikiHomePath">
You are here: [[%WEB%.WebHome][%WebPreferences.CLIENTNAME%]] %META{"parent" formfield="Pagetitle" nowebhome="on" format=" <span class='twikiSeparator'>></span> [[$web.$topic][$formfield]]"}% <span class='twikiSeparator'>></span><strong> %FORMFIELD{"Pagetitle" topic="%TOPIC%" format="<nop>$value" alttext="<nop>%TOPIC%"}% </strong>
</div>
This results in (example):
You are here:
Mercedes > Mercedes C-klasse
Uhm, this example also uses a new
format parameter to META{"parent"}.
--
ArthurClemens - 26 Mar 2005
Implementation
See patch.
Discussion:
Should we generalize this to all all META and not just 'parent' ?
--
AntonAylward - 26 Mar 2005
I don't think this is acceptable. the
renderMetaTags function is already very inflexible, this makes it even worse. The whole area of META and form field rendering needs to be thought out properly, preferably collapsed into a common implementation. I think this needs a rethink, so I'm dropping it from Dakar.
--
CrawfordCurrie - 14 Apr 2005