info:concrete5:58:express

express

Le nouveau module génial de concrete5, qui vous permet de gérer des bases de données relationnelles en deux coup de cuillère à pot!

ad hoc
$c = Page::getCurrentPage();
// Concrete\Core\Entity\Attribute\Value\Value\ExpressValue
$testExpressValue = $c->getAttribute('test_express');
if ($testExpressValue) {
    // array of Concrete\Core\Entity\Express\Entry
    $testExpressEntryArray = $testExpressValue->getSelectedEntries();
    // Concrete\Core\Entity\Express\Entry
    $testExpressEntry = $testExpressEntryArray[0];
    // array of Concrete\Core\Entity\Attribute\Value\ExpressValue
    $attributes = $testExpressEntry->getAttributes();
    foreach ($attributes as $attribute) {
        // Concrete\Core\Entity\Attribute\Value\ExpressValue
        echo '<p>' . $attribute->getAttributeKey()->getAttributeKeyName() . ': ' . $attribute->getDisplayValue() . '</p>';
    }
}

For anyone trying to work with images in Express objects:

$photoFileObject = $entry->getImageAttributeHandle();
if (is_object($photoFileObject)) {
    $photoFileObjectVersion = $photoFileObject->getVersion();
    $photoRelativePath = $photoFileObjectVersion->getRelativePath();
}

source: https://www.concrete5.org/community/forums/customizing_c5/get-express-values-from-page-attribute/

Des outils express libres fait avec mes petites pognes

Une bibliographie toute simple aka personnaliser l'affichage des données:

A package to import a vcf/csv adressbook into concrete5's express

  • info/concrete5/58/express.txt
  • Dernière modification : 2020/02/14 07:49
  • de radeff