Tags:
create new tag
view all tags

Question

I'm creating a page inventory system for a website. The site pages are made up of modules, so I have a template with an attached form to document the modules, and then another template with an attached form to document the pages. I have a topic called ModuleInventory that contains the following search string to dynamically update the modules list:

%STARTINCLUDE%%SEARCH{"META:FORM.*SiteInventoryModuleForm;[M]odule Name.*value=.*[a-zA-Z]" web="Sandbox" scope="text" regex="on" nototal="on" nosearch="on" casesensitive="on" order="formfield(Module Name)" format=" [[$topic]]"}%%STOPINCLUDE%

Notice the STARTINCLUDE and STOPINCLUDE in this code. This is because in the page documentation template topic I want to create an EditTable where one of the fields contains a drop-down menu of all the modules that is drawn from this search string (in other words, when the ModuleInventory topic updates, so should the options in the EditTable select field). The code I'm currently using for the EditTable on the page documentation template is as follows:

*Modules on the Left*
%EDITTABLE{format="|row,0|select,1,%INCLUDE{"ModuleInventory"}%|"}%
This works fine as long as I only have one module listed on ModuleInventory, but as soon as the list grows to include more than one module, the EditTable breaks on the page doumentation template, as shown below:

Modules on the Left
%EDITTABLE{format="|row,0|select,1, LatestNews
LatestAndGreatest OnTheSpot UserSoapbox|"}%

I've tried several different ideas, but right now I'm just digging in the dark. Is there a simple way to get this search-generated list of modules to show up as a list of EditTable selections?

Environment

TWiki version: TWikiRelease04x00x00
TWiki plugins: DefaultPlugin,
Server OS:  
Web server:  
Perl version:  
Client OS: OSX
Web Browser: Firefox
Categories:  

-- PhilGochenour - 04 Jan 2008

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

The problem could be with carriage returns. You may try adding the newline="<br />" parameter to the search string. You can use any other replacement code for newlines as well.

-- MatthewCardozo - 04 Jan 2008

I tried inserting the newline paramter, but that doesn't seem to have made any difference.

-- PhilGochenour - 04 Jan 2008

Use the separator=" " parameter in VarSEARCH to change newlines to spaces.

-- PeterThoeny - 02 Mar 2008

Change status to:
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2008-03-02 - PeterThoeny
 
  • 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-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.