This question about Topic Markup Language and applications: Answered

A URL that isn't a link

If I have a URL (http://...) in a macro variable that I want to appear on a wiki page, I can just write it in the code. But if I want it to display as plain text, not as a link to the URL, that doesn't seem possible. (For example, the URL may be bogus, just an example, so following a link could actually be harmful.) I can write the URL itself directlly and bound it with verbatim tags and that works. But then the variable isn't expanded and I really want to use the variable. Solution?

* Set MYURL = "http://example.com/"

I want the value of http://foswiki.org to appear here as plain text, not as a link.

-- DaveClose - 30 Aug 2013

Stick some <nop> tags into the URL. E.g.: http:<nop>//example.com renders as http:%nop%//example.com

-- CrawfordCurrie - 31 Aug 2013

Thanks, but that doesn't help. The reason this value is a variable is so that it can be used multiple places. Some of those places expect to use the value as part of an active link ("http://foswiki.org/dir/file"). The http://foswiki.org value by itself is not a valid link so I don't want it look like one when displayed alone.

-- DaveClose - 03 Sep 2013

Put the <nop> in front of the % tag when you don't want it to be a link.

   * Expands: %MYURL%/Main/WebHome
  • Suppressed: http://foswiki.org
   * Suppressed: <nop>%MYURL%
-- GeorgeClark - 04 Sep 2013

Thanks, George. That solves my problem.

-- DaveClose - 05 Sep 2013

BTW, my examples never used "foswiki.org" as part of the URL. I don't know what changed the text but it is now quite confusing to read.

-- DaveClose - 05 Sep 2013
 

QuestionForm edit

Subject Topic Markup Language and applications
Extension
Version Foswiki 1.1.8
Status Answered
Related Topics
Topic revision: r5 - 05 Sep 2013, DaveClose
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy