Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

What is an article?

An article is actually the page of the website.

 

An article is actually the page of the website. article is a client ressource.

Article id's

IdDescription
idartidart is the article identifier for the client.
idartlangis 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.

StateDescription
onlineIf 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
publishedIf article is published it can be reached from frontend
lockedIf article is locked, it can't be accessed or changed from other users in CONTENIDO backend
start articleStart article will be shown in frontend, when idart in the url is not set, so it is start article in category
searchableIf article is searchable it can be found through CONTENIDO search
redirectIf redirect is active, browser will follow the redirection url instead of loading current article
  • No labels