Tags:
create new tag
, view all tags
Creating a page of miscellaneous partial templates for easy copy and paste to other pages as required. The intent is to render them so they can be properly copied from the rendered page, not the raw page.

Some tags, in particular the stylesheet and the robots metatag, need to be almost the first thing in the text portion of a page (I think).

See:

Contents

Exclude Robots

Copy the next line to the top of a TWiki page to keep the page from being crawled. You can also (I think) use "index, nofollow" (to index this page but not follow any links on this page to other pages) or "noindex, follow" (to follow links to other pages but not index this page — this may be what I want to do on "dynamic" pages to make sure Google gets to all pages but does not include the ones with dynamic searches in the index. Eventually, I want to add this line to alternate templates.

<meta name="robots" content="noindex,nofollow">

Stylesheet

This needs to go at the top of a page of TWiki content (or on a real stylesheet). This is not yet final, I just wanted to keep it available.

My template is stored in /rhk/my_kde_conf/konqTWiki.css on System12.

<!-- m b p element p b m, top right bottom left, px = pixel-->    
    <style type="text/css">
       P {margin-top: 10px; margin-bottom: 10px; border-top: 0; border-bottom: 0; padding-top: 0; padding-bottom: 0}
      H1 {margin-top: 0; margin-bottom: 0; border-top: 0; border-bottom: 0; padding-top: 0; padding-bottom: 0}
      H2 {margin-top: 0; margin-bottom: 0; border-top: 0; border-bottom: 0; padding-top: 0; padding-bottom: 0}
      H3 {margin-top: 0; margin-bottom: 0; border-top: 0; border-bottom: 0; padding-top: 0; padding-bottom: 0}
      H4 {margin-top: 0; margin-bottom: 0; border-top: 0; border-bottom: 0; padding-top: 0; padding-bottom: 0}
      H5 {margin-top: 0; margin-bottom: 0; border-top: 0; border-bottom: 0; padding-top: 0; padding-bottom: 0}
      H6 {margin-top: 0; margin-bottom: 0; border-top: 0; border-bottom: 0; padding-top: 0; padding-bottom: 0}
      UL {margin-top: 0; margin-bottom: 0; border-top: 0; border-bottom: 0; padding-top: 0; padding-bottom: 0}
      LI {margin-top: 0; margin-bottom: 0; border-top: 0; border-bottom: 0; padding-top: 0; padding-bottom: 0}
     PRE {margin-top: 0; margin-bottom: 0; border-top: 0; border-bottom: 0; padding-top: 0; padding-bottom: 0}
    </style>

I tried some other things that didn't completely work (a different issue - the colors specified in th would not override those specified somewhere else):

 * {
   background : #fffff0 ! important;
/*    color : #000000 
 *           ;
 */
  }
  
th {
  background : #c0c0c0 | important;
     color : #000000
            ; 
  } 

Resource Template

---++ Resources

_See [[Resource Recommendations]].  Feel free to add additional resources to these lists, but please follow the guidelines on ResourceRecommendations including  [[ResourceRecommendations#Guidelines_for_Rating_Resources][Guidelines_for_Rating_Resources]]._

---+++ Recommended 

   * (rhk) [[][]]; ; &mdash;

*&lt;Currently, no significant content below this line.>*
---+++ !! Recommended for Specific Needs

   * (rhk) [[][]]; ; &mdash;

---+++ !! Recommended by Others

   * (rhk) [[][]]; ; &mdash; 

---+++ !! No Recommendation

   * (rhk) [[][]]; ; &mdash; 

---+++ !! Not Recommended

   * (rhk) [[][]]; ; &mdash; 

Contributors Tag with Initials and Date

Not sure exactly how to use this conveniently as copy and paste — I think you may have to:

  • paste this into a page (without verbatim tags),
  • add your initials within the last pair of square brackets
  • save the page and edit it a second time (confirm that it has picked up your username and date), then preview and save it again

[[%WIKIUSERNAME%#%DATE%][]]

Contributors Template

For proper operation, this must be outside of any <noautolink> tag pairs.

---++ Contributors
   * () Main.RandyKramer - 20 May 2003
   * _If you edit this page: add your name here; move this to the next line; and if you've used a comment marker (your initials in parenthesis), include it before your TWiki.WikiName._

Mail List Citation

There was a thread on the expert mailing list dealing with this, which you should be able to find with this information (see [[Mail List Archives]]):
<blockquote>
<verbatim>
</verbatim>
</blockquote>

<blockquote>
<blockquote>
</blockquote>
</blockquote>
<verbatim>
</verbatim>

Anchors

An anchor tag must be a TWikiWord at the beginning of a line. Taking advantage of TWiki line concatenation behavior, it can be on the line before another line, as long as there is no blank line separating the two. How about a <br /> or <p /> tag?

Headings create an automatic anchor of up to 32 characters with spaces replaced with underbars ("_").

#MyAnchor 

Formatted Search

For the Linux Audio pages, to display pages prefixed by "LA_", but not those prefixed by "LA_SC_", I added a zero width negative lookahead assertion ;-), as follows:

"^[L]A(?!SC_)" regex ...

See Regular Expression: Grouping Constructs for additional possibilities.

---++ List of ___ Pages

To add additional [[AbiWord Faq]] pages, simply create a new page using a name prefixed with "AbiWordFaq"nn... 

Note: The following list  might not include all pages related to [[AbiWord]] because it searches only for pages with a prefix of <nop>AbiWordFaq.

%SEARCH{ "^[A]biWordFaq" regex="on" scope="topic" nosearch="on" nototal="on" header="   * *Page Title: Summary* <p />" format="   * [[$topic]]: $summary <p />" }%

Forced Page Break

Use this before a sketch, so that, when printed, the sketch is not broken by a page break. It is from http://www.htmlgoodies.com/beyond/css_print.html

<STYLE TYPE="text/css">
     P.breakhere {page-break-before: always}
</STYLE> 

<P CLASS="breakhere">

Drawing

Insert a drawing (file) name within the curly brackets.

%DRAWING{}%

Attached Files Note

---++ Attached Files
_Files are attached to this page (and links are embedded in the text above).  The attachment table is hidden to reduce page download and rendering time.  To view the attachment table, click "Attach", below._

Access Control

See also TWiki.TWikiAccessControl.

Common:

Some other possibilities:

  • Set DENYTOPICRENAME =
  • Set DENYTOPICCHANGE =

  • Set DENYWEBCHANGE =
  • Set ALLOWWEBCHANGE =
  • Set DENYWEBRENAME =
  • Set ALLOWWEBRENAME =

  • Set NOSEARCHALL = on

ALERT! Obfuscating webs is insecure, as anyone who knows the URL can access the web.

  • Set DENYWEBVIEW =
  • Set ALLOWWEBVIEW =

ALERT! Authenticating webs is not very secure, as there is a way to circumvent the read access restriction. It can be useful in certain situations - for example, to simplify site organization and clutter, by hiding low traffic webs - but is not recommended for securing sensitive content.

  • Set the $superAdminGroup variable in lib/TWiki.cfg

Text Box for Automatic Topic Creation

I tried some other things like this as well (that, IIRC, worked) — some had to do with the CFK planned events, IIRC.

<form action="%SCRIPTURLPATH%/edit%SCRIPTSUFFIX%/%WEB%/"> 
_Feel free to start your own new add-on product topic - use a %TWIKIWEB%.WikiName:_ <br />
<input type="text" name="topic" size="32" /> 
<input type="hidden" value="TWikiAddOnProduct" name="TopicClassification" /> 
<input type="hidden" name="onlywikiname" value="on" /> 
<input type="submit" value="Create Topic" /> 
</form>

Example

Feel free to start your own new add-on product topic - use a WikiName:

Include

You can include other pages on this TWiki or any other page on the web.

Syntax:

%INCLUDE{ "page" [pattern="reg-exp"] [rev="1.2"] }%

"page" can be a TWiki page or a URL.

See TWiki.IncludeTopicsAndWebPages.

Previous | Next Page Navigation

I should transfer this to a wish list somewhere.

Some documents really deserve reading in a page sequential fashion. To keep individual pages manageable(editable), there are times when you want to break a long document into smaller pages, but still allow reading in sequential order. One approach is to "%INCLUDE{}% the pages on a single page. The disadvantage is that you need to go through "a level of indirection" to edit the text.

An alternative could be to keep the small pages distinct, but add previous | next page links. That is tedious to do by hand, it would be nice to have some support in TWiki to create such links automatically. The purpose of this little section is to begin to brainstorm about how that might be done:

I can envision a tool, that includes something like an include page. You put the titles of all the pages you want read in a specified sequence on that page in the desired order. You press the magic button, and a TWiki tool goes to each of those pages and adds the appropriate links to buttons labeled "Prev" and "Next" (maybe two sets of such buttons, one at the top and one at the bottom of a page). This implies that the pages already exist, which, for now, seems as good an assumption as any. We could require that a "skeleton" of the buttons already exist on each of those pages, but that's really not necessary -- it could be nice as a sort of template to specify the location of those buttons.

If that "something like an include page" became a (real TWiki) TOC, then the pages could be navigated either by the "keep returning to the TOC and selecting the next topic" method or the sequential prev / next page method (as well as traditional TWiki methods, like from the WebChanges or WebSearch page, Google, or whatever.

For a robust tool, there should be a method to force the links to be redone if a new page is inserted on that TOC page (or just a rearrangement of existing pages).

Page Redirect

(not tested yet, but I've read that this may work)

Update, apparently this does not work (on twiki.org), maybe it requires a plugin (see Plugins.RedirectPlugin), and the syntax should be more like this:

%REDIRECT{"OopDesignPattern" delay="10"}%

Just looking at the TWiki like syntax, and reading a note on one of the pages that discusses redirection on Codev, maybe, if the plugin is set up, the redirection is strictly a TWiki level redirect, meaning that maybe the redirect is obeyed if you click on a TWiki link, but not if you type the URL (of the page with the redirect) directly into the browser address bar. I've tried it both ways, neither has worked so far.

Before update:

#redirect NewPage

or maybe

#pragma redirect NewPage

Encouragement

In the next iteration of WikiLearn display / HTML templates (not the Web Topic Edit Template, I want to do something to encourage more participation. Maybe replace the note around the copyright notice with something different, doing some brainstorming:

<current notice> Copyright 1999-2004 GMT by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Ideas, requests, problems regarding TWiki? Send feedback .

Is that 2nd sentence required at all? What about the "GMT" (how did that get there)?

<potential new notice> Copyright 1999-2004 by the contributing authors. See an error, omission, or have a question / comment? Don't send feedback, click Edit (near bottom of page) and fix the page or ask a question.

Hmm, while I think about it, I could make that change at any time, as the copyright notice is set in one of the preference pages (or similar).

Named Sections for Summary, Last Revision

I didn't make notes about this when I added these, so I need to reconstruct my intent. Iirc, someone created a patch or plugin to handle named sections. In an effort to eventually allow page summaries to be specifically designated (vs. the first 162 characters of a page) and then display that summary (and last revision) on various search or index pages, I added sections like the following to the Web Topic Edit Template.

Remove the <nop> from the %DATE% on the first save of the page to "capture" the date of the revision, then resave with that date in plain text (so it doesn't continually reflect the current date). I'm not sure I'm going to get this correct here -- see the Web Topic Edit Template.

<!--%SECTION{last_revision}%

  • %DATE% — <revision note> %ENDSECTION%-->

%SECTION{summary}% <summary text> %ENDSECTION%

%SECTION{last_revision}%

  • %DATE% — <revision note> %ENDSECTION%

Page Ratings

Edit | Attach | Watch | Print version | History: r14 < r13 < r12 < r11 < r10 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r14 - 2004-11-25 - RandyKramer
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 1999-2016 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiLearn? WebBottomBar">Send feedback
See TWiki's New Look