Tags:
create new tag
view all tags

SID-02395: using multiple wikiwords to link to one topic

Status: Asked Asked TWiki version: 6.1.0 Perl version:
Category: CategoryEditing Server OS: CentOs Last update: 6 years ago

Is it possible (maybe with a plugin) to do the folling:

i have a Topic, say "MeasuringSoftware" and I want to automatically link to that topic when someone types "MeasuringSoftware" but also when he types "MeasuringProgram", "MeasuringSoftwares" or "SomethingIHaveDefinedSomewhere"?

Is such a thing possible?

-- Michael Werber - 2019-03-14

Discussion and Answer

There may be a few ways to do this however one option would be to attach a form to each topic with a field that contains a list of all the search terms you want that topic to appear on. In our example, we'll use the field name: keywords. You would then need to modify your SEARCH to include searching through the keywords formfield.

An example search (untested) could be something like:

%SEARCH{"name~'*%URLPARAM{"keywords"}%*' OR lc(keywords)~(lc('*%URLPARAM{"keywords"}%*'))" type="query" nonoise="on" format="| $topic |"}%

In the example:
lc() changes everything within the brackets to lowercase. If you want a search for "measuringsoftware" to hit on a keyword of "MeasuringSoftware" you'll want to include this.
URLPARAM grabs the values to search for from the URL.
* (asterisk) allows you to find whatever the user searched for anywhere in the formfield. A formfield could be populated with: "MeasuringProgram, MeasuringSoftwares, SomethingIHaveDefinedSomewhere" and including the asterisks allows for that formfield to match on "MeasuringSoftwares".

-- Jani Hamalainen - 2019-03-15

This sounds like a need for a yet-to-be-written SynonymPlugin.

-- Peter Thoeny - 2019-03-15

@Jani Hamalainen If I get you right that would only affect the search-feature, not automatic linking of WikiWords

@Peter Thoeny Yes, that Plugin seems like it's exactly what I'm looking for. Sad that it's not done yes ;-(

-- Michael Werber - 2019-04-02

MichaelWerber: Yes, you are correct.

-- Jani Hamalainen - 2019-04-02

      Change status to:
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.
SupportForm
Status Asked
Title using multiple wikiwords to link to one topic
SupportCategory CategoryEditing
TWiki version 6.1.0
Server OS CentOs
Web server apache
Perl version

Browser & version

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2019-04-02 - JaniHamalainen
 
  • 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.