© 2015 X2Engine Inc.

Difference between revisions of "Wiki Usage:For contributors"

From X2Engine
Jump to: navigation, search
(The X2Engine class reference)
(The Yii Framework class reference)
Line 31: Line 31:
 
<pre>[[yii:{class name}|]]</pre> Example: [[yii:CActiveRecord|CActiveRecord]]
 
<pre>[[yii:{class name}|]]</pre> Example: [[yii:CActiveRecord|CActiveRecord]]
 
Also, if you wish to link to an attribute or method of a class, use the following syntax (the typical format of permalinks):
 
Also, if you wish to link to an attribute or method of a class, use the following syntax (the typical format of permalinks):
<pre>[[yii:{class name}#{property name}-detail|{class name}::{property name}]]</pre> Example: [[yii:CController#render-detail|CController::render()]]
+
<pre>[[yii:{class name}#{property name}-detail|{class name}::{property name}]]</pre> Example: <pre>[[yii:CController#render-detail|CController::render()]]</pre> becomes <syntaxhighlight lang="html5"><a href="http://www.yiiframework.com/doc/api/1.1/CActiveRecord" class="extiw" title="yii:CActiveRecord">CActiveRecord</a></syntaxhighlight>
  
 
=== Pages in The Definitive Guide to Yii ===
 
=== Pages in The Definitive Guide to Yii ===

Revision as of 18:27, 19 September 2012


Bare Essentials

Edit/create a page
Search for it, and if it doesn’t exist you’ll see a link to create it.
Edit/create a category
Search for Category:{Category Name} and create it in much the same way as with creating a page.
Categorize a page
Place at the top of the page:
[[Category:{Category name}]]

Interwiki Links

Relevant page: The InterWiki manual. Interwiki links are a great way to quickly link to a page in another instance of MediaWiki without including the full URL. The syntax is:

[[{prefix}:{page}|]]

Where the pipe is added at the end of the link to hide the interwiki prefix in the resulting link, which makes links look nicer in general. You can optionally set the link text manually by inserting it after the pipe.

Extra InterWiki Prefixes

Prefixes have been added for common locations throughout this wiki;

The X2Engine class reference

[[x2doc:{class name}|]]
Example:
[[x2doc:Contacts|]]
becomes
<a href="http://doc.x2engine.com/class-Contacts.html" class="extiw" title="x2doc:Contacts">Contacts</a>

Note, however, that because of the .html extension that is automatically appended, one cannot use this for referencing class properties. To do that, use "x2propdoc" interwiki alias;

[[x2propdoc{class name}.html#_{property name}|{class name}::{property name}]]
Example:
[[x2propdoc:Contacts.html#_afterFind|Contacts::afterFind()]]
becomes
<a href="http://doc.x2engine.com/class-Contacts.html#_afterFind" class="extiw" title="x2propdoc:Contacts.html">Contacts::afterFind()</a>

The Yii Framework class reference

[[yii:{class name}|]]
Example: CActiveRecord

Also, if you wish to link to an attribute or method of a class, use the following syntax (the typical format of permalinks):

[[yii:{class name}#{property name}-detail|{class name}::{property name}]]
Example:
[[yii:CController#render-detail|CController::render()]]
becomes
<a href="http://www.yiiframework.com/doc/api/1.1/CActiveRecord" class="extiw" title="yii:CActiveRecord">CActiveRecord</a>

Pages in The Definitive Guide to Yii

[[yiiguide:{article ID}|{article name}]]

Article IDs will typically be a section and a page name in lower case, separated by a period, i.e. "basics.controller".

Pages on x2engine.com

[[x2:{page name}|]]
Example: partners