Versions Compared

Key

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

...

freeze article: if article is frozen, other user can't made changes on it.

 

// FROM HERE DEVELOPER DOCU

Article id's

idart: idart ist is the article identifier for the client.

idartlang: is the client article identifier in different for dirrerent languages.

The tables are referenced by foreign key relation(see below).

 

Image Added

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