Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

Contributing to the Documentation

modxuser edited this page Feb 22, 2017 · 14 revisions
  1. Headlines
  2. Sectioning
  3. Tables
  4. Code Blocks
  5. Miscellaneous Elements
  6. Page Anchors
  7. View on Evolution Docs

If you would like to add to the general documentation, Extras (Snippets + Modules) documentation and tutorials then please use the following as a guide:

Headlines

In general if you want to create a page or add information to an existing page, headlines need to be nested as:

  • H2 - Main section heading
  • H3 - Sub-heading

Note: H1 is declared by the system and shouldn't be used within the page content

Sectioning

HTML "section" and "article" are not required and as such shouldn't be used

Tables

Tables when used should use the following set-up:

<table>
  <thead>
    <tr>
      <th></th>
      <th></th>
      <th></th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
  </tbody>
</table>

If headers are not used, the following applies:

<table>
  <tbody>
    <tr>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
  </tbody>
</table>

Code Blocks

Code can be displayed in two ways: using HTML "pre" or "code" tags

In general, "code" is used inline whereas "pre" is used for blocks of code.

When creating snippet calls, php code, css etc. the code elements need to be changed to their entity numbers. This is to ensure that Evo doesn't run the code that is on the page.

If for example a call is made to Ditto, to demonstrate a call and Ditto is installed, Evo will run the call and not render the code, it will where possible render the output to the page. This is why certain elements need to be changed.

Please use the following table, element to the left, with its number to the right:

! &#33; ` &#96;
@ &#64; = &#61;
+ &#43; ~ &#126;
[ &#91; ] &#93;
{ &#123; } &#125;
( &#40; ) &#41;

In an ideal world your editor of choice will automatically convert < > and " to their entitities when pasted into the document, for example: when using "design view" in Dreamweaver, if not, they also need to be changed:

< &lt; > &gt;
" &quot;
When creating a code block, you need to surround it using a "pre" tag, for example:
<pre class="brush: xml"></pre>

Brushes ("brush: xml") that can be used are:

  • php
  • xml
  • jscript
  • css

So an example ditto call could be something like this:

<pre class="brush: xml">&#91;&#33;Ditto? &amp;parents&#61;&#96;5&#96; &amp;extenders&#61;&#96;summary&#96;&#33;&#93;</pre>

Which is then rendered on the page as:

[!Ditto? &parents=`5` &extenders=`summary`!]

Miscellaneous Elements

Lists: "ol" + "ul" can be used

Warning (Yellow / Beige):

<div class="warning"></div>

Information / Tip (Blue)

<div class="info"></div>

Advanced Tip (Purple)

<div class="note"></div>

Error (Red) - can be used on various elements

<span class="error"></span>
<div class="error"></div>
<code class="error"></code>

Page Anchors

Pages can get long, just as this document has. At the top of this page are anchors to the different sections in this document.

This type of in-page linking is also used within the documentation. We link to an "id", not to an "a" tag.

Example code:

<ul>
  <li><a href="[~[*id*]~]#section1">Section 1</a></li>
  <li><a href="[~[*id*]~]#section2">Section 2</a></li>
</ul>
<h2 id="section1">Section 1</h2>
<p>Blah Blah...</p>
<h2 id="section2">Section 2</h2>

The above code uses [~[*id*]~] in front of the hash, that's because Evo makes use of the base href tag in the head, meaning: if we didn't use the tag you would always be taken to the homepage when you clicked the anchor link as the link points to the homepage + its anchor (id) name