Tags:
create new tag
, view all tags

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 http://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'>&gt;</span> [[$web.$topic][$formfield]]"}% <span class='twikiSeparator'>&gt;</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

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatpatch render_parent_with_formfield_variable.patch r3 r2 r1 manage 2.2 K 2004-09-16 - 21:06 ArthurClemens Diffed against svn rev 1751 (update that takes the text inside other parameters like suffix into account)
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2008-08-13 - RafaelAlvarez
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.