There is'nt a real start of anything when you're using W.
Just type an adress in your web browser, after your W folder. You should see an empty page, not existing yet. You can login to create one at this adress. If you are already logged in, you can juste type page_id/add
, this will directly create a page at this adress.
This page_id
is the identifier of each page, you cant change it later, this is like a real solid adress, it cant move. It can only contain lowercase letters, numbers, hyphens or underscore charachters.
No visitor can see the full list of pages you've created. The only way to see the whole map of your project, is to be conected at least as an editor, and go to the "homepage", the root adress where W is instaled.
The structure of website is very simple as there is no structure. It's you to link the pages together or not.
A page is defined by a unique id
. As it's created, you can access it typing .../your_page_id/
or without slash .../your_page_id
An ID can only contain lowercase letters, numbers, underscore and "-"
Unique identifier, this is the url that point to your page
Page title, can use more complex characters than the ID element. It's printed in the explorer tab name. It's the official name of your page.
The description attribute is a short informations about your page. It's used to create tooltip, when the mouse hover internal links.
tags are used to create selections of pages. tags are one word only, sepparated by commas and whitespace.
Set the level of privacy of your page. 0 -> public 1 -> private reserved to private readers 2 -> not published Nobody but editors can see it.
You can manualy set a date and time for each pages.
All this pages are stored in your database, as a file by page. You can access them in the .../database/name_of_your_store/
W use the fives basics html elements to store your content
You can use any of them, only one or all at the same time, as you prefer.
In any of the five html element you can use to store content, you can use the following syntax, that is specific to W, extending the Markdown syntax :
You can create internal link very quickly, only by using the id of your page. The link text will be remplaced by the title associated with this page.
[page_id]
This will output :
<a href="page->url" class="internal" title="page->description">page->title</a>
%TITLE%
Will output the page title
attribute. This can be usefull when templating, or including differents page element.
%DESCRIPTION%
As for the title, this will output the description
attribute of the page
%DATE% %DATECREATION% %DATEMODIF%
There are tree dates attributes that can be printed. The date attribute, will return the date that can be manualy set in the editor. datecreation will return the date of the page creation. datemodif will output the last editing date.
You can automatically generate summary, based on the page <h*>
elements
%SUMMARY%
This will generate a classic <ul>
html list.
You can create a html list of links pointing to all the pages using this tag.
%TAG:__tag__%
Let's suppose we are in page3 and we have page2, page3, page5, using this tag, this will output :
<ul id="tag"> <li> <a href="2->url" class="internal" title="2->description">2->title</a> </li> <li> <a href="3->url" class="internal actualpage" title="3->description">3->title</a> </li> <li> <a href="5->url" class="internal" title="5->description">5->title</a> </li> </ul>
The list is ordered by the date
attribute, that you can set manualy for each page. You may have noticed that the actual page (page 3), has been specified using .actualpage
class. This can be usefull to create a menu and highlight the current page.
You can use the article
html element, by separating text using at least ====
. It is of course possible to use Markdown synthax inside those articles separators
==== some text ======important this is a longer text ======
This will ouptut :
<article> some text </article> <article id="important"> this is a longer textt </article>
As you may have noticed, there is also the possibility to add a custom id
to any of the articles created that way
As it is too long adding all media of a folder one by one, you can just print the content of an entire folder using this method.
%MEDIA:__directory__
Just point to the good directory inside the media folder. This will output html list, creating image elements, audio players, video players, or just basic link, depending on the media type.
%HTML_ELEMENT%
This will include the matching html element from your page's content in your page body. If there is nothing in the corresponding element, it won't print anything. The name of the html element as to be UPPERCASE.
For example :
%ASIDE% %MAIN%
Will output :
<aside class="page_id"> __the content of your aside__ </aside> <main class="page_id"> __the content of your main__ </main>
You can also use one element multiple times.
%HTML_ELEMENT:page_id%
By doing this, you can include the HTML_ELEMENT
of the page using this page_id
id. You can even nest differents pages source by adding page_id
separated by a dot, this would be like :
%HTML_ELEMENT:page1_id+page2_id%
And you can mix it with the original page content using !
identifier
%HTML_ELEMENT:page3_id+!%
This will output :
<html_element class="page3_id page_id"> __content of page1's html element__ __content of this page html element__ </html_element>