Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this area you can preview your changes. Preview shows you how your article look like in frontend of the website.

Article states

StateDescription
online/

...

offline

...

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).

 

Image Removed

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.

Code Block
languagephp
linenumberstrue
$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.

...

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/frozenIf 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

...