Home
Categories
Dictionary
Download
Project Details
Changes Log
What Links Here
How To
Syntax
FAQ
License

Fallback articles



Fallback articles allow to specify articles which will be used where a reference to another article point to an article which does not exist.

Use cases

There are two cases where you may want to specify fallback articles:
  • You don't want inter-wiki links which point to non existing articles to point to nothing, but you want to provide a custom article where these invalid linkds will point
  • You want links to article in packages you don't include to point to a custom article

Specifying a fallback article

Fallback article for invalid links

To have a falback article which will be used for invalid links, you have to create an article with the fallbackInvalid root. For example:
   <fallbackInvalid title="Invalid link">
   This link point to a not existing article.
   </fallbackInvalid>

The title of the article is optional, by default the generator will use the title from the localization.

Fallback article for not included article

To have a falback article which will be used for links to not included articles, you have to create an article with the fallbackNotIncluded root. For example:
   <fallbackNotIncluded title="Article not included">
   This link point to an article which is not included.
   </fallbackINotIncluded>

The title of the article is optional, by default the generator will use the title from the localization.

Example

Suppose the following wiki file structure:
      -- source
      ---- article1.xml
      ---- index.xml
If we have for the article1.xml article:
   <article desc="article1">
      <ref id="article2" />
   </article>
By default we will have the following content for this article:
fallbackarticle
If we click on the link (which points to a not existing article), we will get on the browser:
fallbackarticle2
Now suppose that we create the following fallback article:
   <fallbackInvalid>
   The text for the fallback invalid.
   </fallbackInvalid>
We will have the following wiki file structure:
      -- source
      ---- article1.xml
      ---- fallback.xml
      ---- index.xml
Now if we click on the link we will go to this fallback article:
fallbackarticle3

See also


Categories: structure

docJGenerator Copyright (c) 2016-2023 Herve Girod. All rights reserved.