News

News-Einträge mit Bildern, Videos und Medien. Unterstützt Links und Downloads pro Eintrag.

Liste

getNewsList($config, $mediaCheck = "false")

Gibt alle News als Array zurück.

$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>';
    }
}
KeyBeschreibungWerte
websiteWebsite-IDSITE_ID oder 'all'
statusStatusfilter'1' = aktiv · '0' = inaktiv · leer = alle
labelLabel-ID FilterID als String
searchFreitextsucheSuchbegriff
orderbySortierfeld'id' · 'date' · 'headline'
directionSortierrichtung'asc' · 'desc'
startOffset (Pagination)Integer als String
limitMax. ErgebnisseInteger als String
KeyBeschreibung
idNews-ID
keyURL-Schlüssel
tagsTags
headlineTitel
contentVolltext (HTML)
descriptionKurzbeschreibung
dateDatum (Unix-Timestamp)
status1 = aktiv
highlightHighlight-Flag (falls gesetzt)
updateLetzte Speicherung (Timestamp)
image_itemsAnzahl Bilder
video_itemsAnzahl Video-Streams
videofile_itemsAnzahl Video-Dateien
media_itemsAnzahl Medien total
image.imageHauptbild (geprüft)
image.thumbnailThumbnail (geprüft)
image.smallKleines Thumbnail (geprüft)
links[].urlLink-URL
links[].buttonLink-Beschriftung
links[].targetZielfenster
links[].referenzInterne Referenz
downloads[].fileDatei-Pfad
downloads[].buttonDownload-Beschriftung
downloads[].typDateityp
[
    {
        "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": [] } ]

Playground