archive_me1Add my vote for this tag create new tag
, view all tags
I looked at BetterSkins, and decided that I wanted a menu on the left hand side like lots of web sites. It turned out to be easy, except for one small detail.

I edited view.tmpl to put the left menu and the %TEXT% into a table. The menu is handled by

Warning: Can't find topic Codev.WebLeftMenu . I decided to put the statement into the WebLeftMenu topic to give the most control to the administrator setting up the menu.

Note: in the following examples I put a space after the opening % in a TWikiVariable so that it would be displayed. Remove it if you cut and paste.

The %TEXT% in view.tmpl was replace with:

<table width="100%" border="0" cellpadding="3" cellspacing="0">
% INCLUDE{"WebLeftMenu"}%

An example WebLeftMenu file contains something like:

Edit the following to change the menu on the left side of this web.
It will be included in a formatting table in the view template.
<td bgcolor="% WEBBGCOLOR%" cellpadding="0" align="left" valign="top">
<font size=-1> 
<A HREF="http://www.databeacon.com" TARGET="_blank">Company web</A><br>
 [[http://www.twiki.org][Twiki]] <br>
 [[http://java.sun.com/j2ee][J2EE]] <br>
 [[http://www.junit.org][JUnit]] <br> 

The problem is that the forced links in the menu don't seem to be converted into html links. Am I doing something wrong? Even plain URLs don't get converted. It does seem to be something I'm doing, since I edited the TWikiWebsTable and inserted links, and they showed up fine in Main. I'm sure there's some little detail I'm missing.

-- JeffSparkes - 20 Jun 2001

The problem you experience is because the view, preview and rdiff scripts only expand the variables on the template but do not Wiki-render it. To fix that you can add this at the end of those scripts:

    $tmpl = &TWiki::handleCommonTags( $tmpl, $topic, $webName );
    my( $head, $body ) = split( /<body/i, $tmpl, 2 );
    $tmpl = join( "", $head, &TWiki::getRenderedVersion( "<body$body" ) );
    $tmpl =~ s/%TEXT%/$text/go;

-- PeterThoeny - 23 Jun 2001

TWikiAlphaRelease has been updated, all scripts are calling getRenderedVersion() for the templates.

-- PeterThoeny - 26 Jun 2001

I think this is likely to throw up some problems with different enhancements that people have done to templates.

-- JohnTalintyre - 26 Jun 2001

It might have some side-effects with existing templates and skins. Those need to be upgraded anyway because there are other changes like MetaDataRendering.

Things to check:

  • Remove empty lines unless you want a =<p>.
  • Escape TWikiWikiWords you don't want to be linked.

See also TWikiReleaseSpring2001UpgradeNotes

-- PeterThoeny - 26 Jun 2001

Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r10 - 2002-05-05 - MikeMannix
  • 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.