Fullscreen
[Show/Hide Right Column]


Semantic Alias

An alias is a Semantic link between wiki page names, not to be confused with Plugin Alias. This wiki syntax can be used to prevent parallel pages. When using it you say that "all these pagenames link here". It will also prevent those alias pagenames from being created by linking.

Requirements: It depends on the "Redirect to similar wiki page" feature and also the semantic links feature must be active when the semantic link is created/saved on the page, otherwise the link won't register.

Usage on a wiki page (ex.: on page "Example")
~tc~
(alias(Example1))
(alias(Examples))
(alias(Anything at all))
~/tc~

This list of aliases being added to the page "Example" will redirect links to "Example1", "Examples" or "Anything at all" to "Example".

Enclosing the list of aliases with a ~tc~ comment block ~/tc~ like in the example above is recommended but optional. It prevents the aliases from being shown when the page is rendered.


Q: What if Example1 already exists?
A: Then, alias has no effect.

Q: If people search for example1 what happens?
A: In Tiki4, they should see "Example" in page list

Q: Is it SEO friendly (redirect with status 301 to avoid "content duplication", etc.)?
A: ?

Q: Do backlinks from "Example" include "Example1" links?
A: Not in v4.1

Benefits

  • Avoids making pages just for redirects, and thus is cleaner for search results, page hit stats, etc.
  • Permits to have plenty of synonyms, alternate spellings
  • By having multiple aliases, you can increase the chance that people will link to the page without knowing the exact page name
  • When renaming a page, you can maintain the old hyperlink

Semantic Prefix Aliases


In Tiki 6, the feature has been enhanced to make it possible to redirect all pages with a certain prefix to a particular page, which when used in conjunction with an itemId after the prefix, is useful for pages with Pretty Trackers. For example, to redirect links like Project:256? or Project:32? to the page "Projects" which is a pretty tracker page, the following can be added to the View Project page. Put it inside Tiki comments to hide it from view if necessary.

Prefix Alias operates similar to Apache mod_rewite. Using "prefixalias" configuration as described below it is possible to have Tracker Item links rewritten and automatically redirect to display the item in your Pretty Tracker Pages.

(prefixalias(Project:))


First thing the prefixes that are to be allowed should be set first under Admin...Wiki (by the admin.)

Minimal usage on a wiki page (ex.: on page "Project")
(prefixalias(Project:))
(trackerid(3))


Where "Project:" is replaced with the actual wiki page (destination) for the link rewrite, trackerid(3) specifies which tracker links will be rewritten. That is the minimum required (in addition to entering the prefix under Admin...Wiki as above.)

Extended usage on a wiki page (ex.: on page "Resource")
(prefixalias(Resource:))
(trackerid(3))
(fieldid(12))


Where adding fieldid(12) allows matching of a specific tracker field when using the field 'value' in your prefix alias.

Example: Inserting ((Resource:Categories Revamp Project)) into the wiki page will automatically display a link to the Resource item with that title (in field 12 for tracker 3).

If the part of the link after the pagename is an integer it will automatically become the itemId in the query string. So for example a link to /Resource256 becomes a link to /Resource?itemId=256. This allows automatic generation of links to your pretty tracker pages for displaying your tracker items.

Admin panel

Make sure the preference and dependencies are OK in tiki-admin.php?page=wiki
Image

Alias


Contributors to this page: xavi67984 points  , Marc Laporte9146 points  , Carsten Schmitz60 points  , Nelson810 points  , mlpvolt4388 points  , pondstone34 points  , yohomerr37 points  and luciash d' being2161 points  .
Page last modified on Wednesday 29 February, 2012 13:55:48 UTC by xavi67984 points .
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.

Site Language

Reference Guide

Keywords

These keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):



Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki