News-Einträge mit Bildern, Videos und Medien. Unterstützt Links und Downloads pro Eintrag.
Gibt alle News als Array zurück.
Code
$config = [];
$config["website"] = '1'; // Website-ID (SITE_ID)
$config["status"] = '1'; // 1 = aktiv, 0 = inaktiv, leer = alle
$config["label"] = ''; // Label-ID Filter
$config["search"] = ''; // Freitextsuche im Titel
$config["orderby"] = 'date'; // id | date | headline
$config["direction"] = 'desc'; // asc | desc
$config["start"] = '0'; // Offset für Pagination
$config["limit"] = '10'; // Max. Einträge
$news = getNewsList($config, "false");
foreach ($news as $n) {
echo $n["headline"]; // Titel
echo $n["content"]; // Volltext
echo $n["description"]; // Kurzbeschreibung
echo date("d.m.Y", $n["date"]); // Datum
echo $n["image"]["image"]; // Hauptbild
echo $n["image"]["thumbnail"]; // Thumbnail
echo $n["image_items"]; // Anzahl Bilder
// Links:
foreach ($n["links"] as $link) {
echo '<a href="'.$link["url"].'" target="'.$link["target"].'">'.$link["button"].'</a>';
}
}
$config Parameter
| Key | Beschreibung | Werte |
|---|---|---|
| website | Website-ID | SITE_ID oder 'all' |
| status | Statusfilter | '1' = aktiv · '0' = inaktiv · leer = alle |
| label | Label-ID Filter | ID als String |
| search | Freitextsuche | Suchbegriff |
| orderby | Sortierfeld | 'id' · 'date' · 'headline' |
| direction | Sortierrichtung | 'asc' · 'desc' |
| start | Offset (Pagination) | Integer als String |
| limit | Max. Ergebnisse | Integer als String |
Rückgabe-Keys
| Key | Beschreibung |
|---|---|
| id | News-ID |
| key | URL-Schlüssel |
| tags | Tags |
| headline | Titel |
| content | Volltext (HTML) |
| description | Kurzbeschreibung |
| date | Datum (Unix-Timestamp) |
| status | 1 = aktiv |
| highlight | Highlight-Flag (falls gesetzt) |
| update | Letzte Speicherung (Timestamp) |
| image_items | Anzahl Bilder |
| video_items | Anzahl Video-Streams |
| videofile_items | Anzahl Video-Dateien |
| media_items | Anzahl Medien total |
| image.image | Hauptbild (geprüft) |
| image.thumbnail | Thumbnail (geprüft) |
| image.small | Kleines Thumbnail (geprüft) |
| links[].url | Link-URL |
| links[].button | Link-Beschriftung |
| links[].target | Zielfenster |
| links[].referenz | Interne Referenz |
| downloads[].file | Datei-Pfad |
| downloads[].button | Download-Beschriftung |
| downloads[].typ | Dateityp |
Ausgabe (Live)
[
{
"id": "21",
"key": "adfasdf-af21",
"tags": "",
"headline": "adfasdf af",
"content": "adsf adf adfa<\/p>",
"description": "",
"date": "1770623940",
"label": [
""
],
"website": [
"1"
],
"status": "1",
"update": "2026-02-09 09:01:01",
"image_items": 0,
"video_items": 0,
"videofile_items": 0,
"media_items": 0,
"image": [],
"video": [],
"videofile": []
},
{
"id": "20",
"key": "test230120",
"tags": "",
"headline": "test2301",
"content": "
adsfsadfdsf sdgfsdgf<\/p>",
"description": "asdfdsfds",
"date": "1769159160",
"label": [
"6"
],
"website": [
"1"
],
"status": "1",
"highlight": "1",
"update": "2026-02-09 08:59:23",
"links": [
{
"referenz": "instagram",
"url": "https:\/\/www.betasolutions.ch",
"target": "_blank"
}
],
"link": {
"instagram": "https:\/\/www.betasolutions.ch"
},
"downloads": [
{
"id": "41",
"button": "adfdsf",
"referenz": "file",
"file": "1769159258_sonne.",
"typ": ""
}
],
"image_items": 3,
"video_items": 0,
"videofile_items": 0,
"media_items": 3,
"image": {
"id": "1445",
"image": "media\/news\/image\/1445.webp",
"thumbnail": "media\/news\/image\/thumbnail\/1445.webp",
"small": "media\/news\/image\/small\/1445.webp",
"check": "false"
},
"video": [],
"videofile": []
},
{
"id": "18",
"key": "Test-News18",
"tags": "",
"headline": "Test News",
"content": "
asdfasdf asdf<\/p>",
"description": "HipHop",
"date": "1769083320",
"label": [
""
],
"website": [
"1"
],
"status": "1",
"update": "2026-01-22 13:02:27",
"image_items": 0,
"video_items": 0,
"videofile_items": 0,
"media_items": 0,
"image": [],
"video": [],
"videofile": []
}
]