Multihref (since 1.4.2)

Skip to end of metadata
Go to start of metadata

Multihref provides to create a references to other elements in pimcore (document, asset, object).

Configuration

Name
Type
Description
width
integer
Width for the widget in pixels (optional)
height
integer
Height for the widget in pixels  (optional)
title string Title for the input-widget
uploadPath string Target path for (inline) uploaded assets (since 1.4.6)

Accessable properties

Name
Type
Description
elements
array
Array of the assigned elements

Available methods

Name
return
Description
getElements()
array
Array of the assigned elements
current()
int
Get the current index while looping

Example

<?php if ($this->editmode) { ?>
    <?php print $this->multihref("multihref"); ?>
<?php } else { ?>
    <!-- you can iterate through the elements using directly the tag -->
    <?php foreach($this->multihref("multihref") as $element) { ?>
        <?php echo Element_Service::getElementType($element); ?>: <?php echo $element->getFullPath(); ?>
        <br />
    <?php } ?>
<?php } ?>

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.