Hierarchisches Content-Modul mit Hauptkategorien und Kategorien. Jeder Artikel kann Bilder, Video-Streams, Videodateien, Links und Downloads enthalten. Unterstützt User-Zuordnung und Highlight-Flag.
Gibt Artikel zurück. Filtert nach Kategorie, Hauptkategorie, User, Label und Status. Enthält Medien-Zähler, zugeordnete Links und Downloads.
Code
$config = [];
$config["website"] = '1';
$config["status"] = '1';
$config["maincategorie"] = ''; // optional: Hauptkategorie-ID
$config["categorie"] = ''; // optional: Kategorie-ID
$config["user"] = ''; // optional: User-ID
$config["label"] = '';
$config["search"] = '';
$config["orderby"] = 'date'; // id | date | headline | random
$config["direction"] = 'desc';
$config["start"] = '0';
$config["limit"] = '10';
$articles = getArticleList($config);
foreach ($articles as $a) {
echo $a["headline"];
echo $a["subheadline"]; // Unterüberschrift
echo $a["shortcontent"]; // Kurzbeschreibung
echo $a["content"]; // Hauptinhalt (HTML)
echo date("d.m.Y", $a["date"]);
echo $a["image"]["image"]; // Erstes Bild
echo $a["image_items"]; // Anzahl Bilder
// Autoren:
foreach ($a["user"] as $user) {
echo $user["firstname"].' '.$user["lastname"];
}
// Links:
foreach ($a["links"] as $link) {
echo '<a href="'.$link["url"].'">'.$link["button"].'</a>';
}
// Downloads:
foreach ($a["downloads"] as $dl) {
echo '<a href="'.$dl["file"].'">'.$dl["button"].'</a>';
}
}
$config Parameter
| Key | Beschreibung | Werte |
|---|---|---|
| website | Website-ID | SITE_ID · 'all' |
| status | Statusfilter | '1' · '0' · leer |
| maincategorie | Filter nach Hauptkategorie-ID | ID |
| categorie | Filter nach Kategorie-ID (übersteuert Sortierung aus Kat.) | ID |
| user | Filter nach zugeordnetem User | User-ID |
| label | Label-ID Filter | ID |
| search | Freitextsuche in Titel und Tags | Begriff |
| orderby | Sortierfeld | 'id' · 'date' · 'headline' · 'random' |
| direction | Richtung | 'asc' · 'desc' |
| start / limit | Pagination | Integer |
Rückgabe-Keys
| Key | Beschreibung |
|---|---|
| id / key / tags | Basisdaten |
| headline | Titel |
| subheadline | Unterüberschrift |
| shortcontent | Kurzbeschreibung / Teaser |
| content | Hauptinhalt (HTML) |
| description | Meta-Beschreibung (SEO) |
| date | Veröffentlichungsdatum (Unix-Timestamp) |
| maincategorie / categorie | Kategorie-IDs |
| highlight | '1' wenn aktives Highlight, sonst nicht gesetzt |
| status / update | Status und letztes Update |
| user[].id / .firstname / .lastname / .email | Zugeordnete Autoren |
| links[].referenz / .url / .target / .button | Verknüpfte Links |
| link["website"] / link["facebook"] / ... | Shortcut-Keys nach Referenz-Typ |
| downloads[].id / .button / .referenz / .file / .typ | Downloads |
| image_items / video_items / videofile_items / media_items | Anzahl Medien |
| image[].image / .thumbnail / .small | Bilder (Array, erstes Element = Hauptbild) |
| video[].embed / .url | Video-Streams (eingebettete iframes) |
| videofile[].video / .width / .height | Hochgeladene Videodateien |
Ausgabe (Live)
[
{
"id": "24",
"key": "Test16-05-2023-090324",
"tags": "",
"headline": "Test 1 ad",
"subheadline": "Testen der Links 1",
"shortcontent": "Tiktok Fontawsome Test 1<\/p>",
"content": "
Tiktok<\/p>",
"description": "blub",
"date": "1771633200",
"maincategorie": "0",
"categorie": "0",
"label": [
"6"
],
"website": [
"1"
],
"status": "1",
"update": "2026-02-21 01:20:42",
"links": [
{
"referenz": "email",
"url": "mailto:info@danceinn.ch",
"target": "_blank"
},
{
"referenz": "phone",
"url": "tel:+41719600324",
"target": "_blank"
},
{
"referenz": "tiktok",
"url": "https:\/\/www.tiktok.com\/de-DE",
"target": "_blank"
},
{
"referenz": "facebook",
"url": "https:\/\/www.facebook.com\/",
"target": "_blank"
},
{
"referenz": "email",
"url": "mailto:info@lagunabay.ch",
"target": "_blank"
},
{
"referenz": "google",
"url": "https:\/\/v1.laguna.thebandits.ch\/m\/food-drinks",
"target": "_blank"
}
],
"link": {
"email": "mailto:info@lagunabay.ch",
"phone": "tel:+41719600324",
"tiktok": "https:\/\/www.tiktok.com\/de-DE",
"facebook": "https:\/\/www.facebook.com\/",
"google": "https:\/\/v1.laguna.thebandits.ch\/m\/food-drinks"
},
"downloads": [
{
"id": "46",
"button": "Tourflyer 2026",
"referenz": "image",
"file": "1770676817_Getrnkekarte.png",
"typ": "png"
}
],
"image_items": 8,
"video_items": 0,
"videofile_items": 2,
"media_items": 10,
"image": {
"id": "1413",
"image": "media\/article\/articel\/image\/1413.webp",
"thumbnail": "media\/article\/articel\/image\/thumbnail\/1413.webp",
"small": "media\/article\/articel\/image\/small\/1413.webp",
"check": "false"
},
"video": [],
"videofile": {
"id": "310",
"video": "media\/article\/articel\/video\/310.mp4",
"check": "false"
}
},
{
"id": "43",
"key": "asdfadsfasdfadf09-02-2026-205543",
"tags": "",
"headline": "asdfadsfasdfadf",
"subheadline": "",
"shortcontent": "",
"content": "
asdfasfasdfadf<\/p>",
"description": "",
"date": "1770670500",
"maincategorie": "0",
"categorie": "0",
"label": [
""
],
"website": [
"4",
"1"
],
"status": "1",
"update": "2026-02-09 21:55:32",
"user": [
{
"id": "1012",
"firstname": "Edith",
"lastname": "Gisler",
"email": "edith.gisler@betasolutions.ch"
}
],
"image_items": 0,
"video_items": 0,
"videofile_items": 0,
"media_items": 0,
"image": [],
"video": [],
"videofile": []
},
{
"id": "42",
"key": "Test-neu-dasdfadsf09-02-2026-083342",
"tags": "",
"headline": "Test neu dasdfadsf",
"subheadline": "",
"shortcontent": "",
"content": "
adfadsfa df<\/p>",
"description": "",
"date": "1770625980",
"maincategorie": "13",
"categorie": "68",
"label": [
""
],
"website": [
"1"
],
"status": "1",
"update": "2026-02-09 09:34:06",
"image_items": 0,
"video_items": 0,
"videofile_items": 0,
"media_items": 0,
"image": [],
"video": [],
"videofile": []
}
]