Copied to clipboard...

ConcreteCms Essentials

Express

Find and Read Express Entries

Get the entity (=Table)
The entity is like the table of a database
$entity = Express::getObjectByHandle('entity_handle');
Instantiate and configure a list of entries $list = new Concrete\Core\Express\EntryList($entity); $list->filterByName('Christian'); $list->sortByName('asc');
Retrieve the entries as Array of Concrete\Core\Entity\Express\Entity objects
$entries = $list->getResults();

Warning: Undefined array key 1 in /usr/www/users/cgraue/infosophie.de/www/box/man/concrete/index.php on line 182

Files/Images

Allgemein

$file enthält ein Datei-Objekt (Concrete\Core\Entity\File\File)

Integrate Images in Templates/Pages

Thumbnail (load resized Image) $im = Core::make('image/thumbnailer');
$image = $im->getThumbnail($file, 700, 500, false);
echo '<img src="' . $image.src . '">';
Core::make('image/thumbnailer')
Helper für den Zugriff auf Bilder als Thumbnails.
'image/thumbnailer'
Concrete\Core\File\Image\BasicThumbnailer
getThumbnail(File, $maxWidth, $maxHeight, $crop = false)
Returns a path to the specified item, resized and/or cropped to meet max width and height. $obj can e Returns an object with the following properties: src, width, height.
Dateiobjekt
max Breite des Bildes in Pixeln
max image height in px
cropping
(stdObj) Standard-Objekt mit den Eigenschaften src (URL zum Bild), width und height (Maße des Bldes)

View

Allgemein

Der aktuelle Kontext ist Concrete\Core\Page\View\PageView ($this) $c enthält das Page-Objekt der aktuellen Seite (Concrete\Core\Page\Page)
Page-Title $c->getCollectionName();
Attribute Value $c->getAttribute('handle');
Die Funktion liefert einen Wert oder eine Objekt entsprechend des Attribut-Typs des angegebenen Attribut-Handles.