What is an article?
An article is actually the page of the website.Articles in CONTENIDO
Articles in CONTENIDO are placed in backend under Content -> Articles.
On the screenshot above you can see the articles overview area with one start article. In this area you can perform several article related actions like create a new article, edit an existing article, toggle an articles online state, lock, move, duplicate, freeze an article, set start article and delete etc.
Article contains also another important areas like:
Preperties:
In article properties you can change article title or alias, make redirect, use time control to publish article, move to another category, get article link and more important actions.
Seo:
In SEO area you can set all article relevant SEO tags like keyword, description, sitemap priority, robots etc.
Configuration:
In this area you can set article template. If no template is set in the article, then articles use their category template.
Editor:
Editor area is most important area. Here you can change whole page content like headline, text, pictures etc.
Raw data:
In raw data area you can see all content types and their content in current article.
You can change content or remove raw content here.
Preview:
In this area you can preview your changes. Preview shows you how your article look like in frontend of the website.
Article states
online/offline: if article is offline you can't reach it from frontend of the page.
freeze article: if article is frozen, other user can't made changes on it.
// FROM HERE DEVELOPER DOCU
An article is actually the page of the website. article is a client ressource.
Article id's
idart: idart is the article identifier for the client.
idartlang: is the client article identifier for dirrerent languages.
The tables are referenced by foreign key relation(see below).
How to use
The usage is very simple. You can load single or multiple article objects by using article respectively article collection.
To see all possible loading and object handling methods, take a look on Item or ItemCollection classes.
With set and get methods you can change all table properties and the store it like in example below.
$idart = 1; $article = new cApiArticle($idart); $articleCol = new cApiArticleCollection(); $article = $articleCol->loadItem($idart); $idartLang = 1; $artLang = new cApiArticleLanguage($idartLang); $artLangCol = new cApiArticleLanguageCollection(); $artLang = $artLangCol->loadItem($idartLang); $artLang->set("online", 1); $artLang->get("online"); $artLang->store();
Article states
Articlelanguage object has some important states which are commom used during development.
online: If article is online, it can be reached from frontend. Example: Its important if you generate link to article or doing something else, you should check that article is online, otherwise it won't be found and you will be redirected to the home or error page.
published: If article is published it can be reached from frontend.
locked: If article is locked, it can't be accessed or changed from other users in CONTENIDO backend.
start article: Start article will be shown in frontend, when idart in the url is not set, so it is start article in category.
searchable: If article is searchable it can be found through CONTENIDO search.
redirect: If redirect is active, browser will follow the redirection url instead of loading current article.