Versions Compared

Key

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

...

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.

...

locked: If article is locked, it can't be accessed or changed from other users in CONTENIDO Backendbackend.

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.