url
stringlengths
50
196
text
stringlengths
3
17.2k
heading
stringlengths
2
103
embeddings
list
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Areablock#areablock-editable
Areablock Editable
Areablock Editable
[ 0.0407746322453022, -0.20878329873085022, -0.323869913816452, -0.060625482350587845, 0.13485270738601685, -0.2584889233112335, 0.27329766750335693, -0.01399784442037344, 0.22839167714118958, 0.5027430653572083, -0.3921125829219818, 0.41949698328971863, -0.013873107731342316, 0.136981874704...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Areablock#general
General The areablock is the content construction kit for documents offered by Pimcore.
General
[ -0.1803073287010193, -0.24838954210281372, -0.13743795454502106, 0.045013729482889175, -0.3500296473503113, -0.09761584550142288, 0.3341526389122009, 0.12534452974796295, 0.10860571265220642, 0.10494779050350189, 0.2536841034889221, 0.3007955849170685, 0.15347027778625488, 0.32926890254020...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Areablock#integrate-an-areablock-in-a-template
Integrate an Areablock in a Template Similar to the other document editables, an areablock can be integrated in any document view template as follows: {{ pimcore_areablock("myAreablock") }} Advanced usage with allowed areas, below: {{ pimcore_areablock("myAreablock", { "allowed": ["iframe","googletagcloud","spacer","rssreader"], "group": { "First Group": ["iframe", "spacer"], "Second Group": ["rssreader"] }, "globalParams": { "myGlobalParam": "Global param value" }, "params": { "iframe": { "parameter1": "value1", "parameter2": "value2" }, "googletagcloud": { "param1": "value1" } } }) }}
Integrate an Areablock in a Template
[ -0.17303737998008728, -0.1086956188082695, -0.15492700040340424, -0.3966716527938843, -0.08605823665857315, -0.28300318121910095, 0.5102942585945129, 0.018667470663785934, -0.026750940829515457, 0.08502297103404999, -0.26521289348602295, 0.7311429381370544, -0.02187245525419712, 0.30055579...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Areablock#accessing-parameters-from-the-brick-file
Accessing Parameters from the Brick File Use the value of parameter named "param1" for this brick: {{ param1 }}
Accessing Parameters from the Brick File
[ -0.23337431252002716, -0.1395779550075531, -0.25484368205070496, 0.08014523983001709, 0.31472134590148926, -0.22470267117023468, 0.4941902756690979, 0.20743727684020996, 0.17836210131645203, 0.40154293179512024, -0.020630760118365288, 0.3714594841003418, -0.11424493044614792, 0.00745031610...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Areablock#sorting-items-in-the-menu
Sorting Items in the menu {{ pimcore_areablock("content", { "allowed": ["image","video","wysiwyg"], "sorting": ["wysiwyg","video","image"], }) }} And you can see the effect, below:
Sorting Items in the menu
[ -0.03050547093153, -0.3334101438522339, -0.25344136357307434, 0.1492689549922943, 0.06730774790048599, -0.18999071419239044, 0.14238344132900238, 0.19397777318954468, -0.05400748923420906, 0.16437092423439026, -0.34390318393707275, 0.5741607546806335, 0.11048292368650436, 0.117247954010963...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Areablock#configuration
Configuration Name Type Description allowed array An array of area-ID's which are allowed for this tag. The order of items in the array is also used as the default sorting, but of course you can combine this configuration with sorting sorting array An array of area-ID's in the order you want to display them in the menu. params array Optional parameter, this can also contain additional brick-specific configurations, see brick-specific configuration globalParams array Same as params but passed to all bricks independent from the type group array Array with group configuration (see example above). manual bool Forces the manual mode, which enables a complete free implementation for areablocks, for example using real <table> elements... example see below reload bool Set to true, to force a reload in editmode after reordering items (default: false) limit int Limit the amount of elements limits array An array of area-ID's with count to limit the amount of certain elements e.g. {"iframe": 1, "teasers": 2} areablock_toolbar array Array with option that allows you to configure the toolbar. Possible options are width, buttonWidth and buttonMaxCharacters controlsAlign string The position of the control button bar. Options are: top, right and left. controlsTrigger string Options are: hover(default) and fixed . class string A CSS class that is added to the surrounding container of this element in editmode
Configuration
[ 0.061659134924411774, -0.3940545320510864, -0.23954568803310394, -0.010141674429178238, -0.07798351347446442, 0.12551820278167725, 0.43467873334884644, 0.21397778391838074, 0.4404674172401428, 0.0987945944070816, -0.22359977662563324, 0.29568520188331604, -0.04151218757033348, 0.1587028503...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Areablock#example
Example {{ pimcore_areablock("myArea") }}
Example
[ -0.35417383909225464, -0.4598831236362457, -0.2557309567928314, -0.06270328909158707, 0.04901321232318878, -0.5038911700248718, 0.5010950565338135, 0.03582839295268059, 0.0106333177536726, 0.3158539831638336, 0.1033434271812439, 0.40432268381118774, 0.2097959965467453, 0.1919994205236435, ...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Areablock#methods
Methods Name Return Description getCount() int Total count of blocks getCurrent() int Current number of block (useful with area bricks) getCurrentIndex() int Get the current index (index is different from position, as you can move block around) getElement() array Get an element out of an areabrick renderIndex() - Renders only one specific block within the areablock
Methods
[ -0.06454881280660629, -0.4487752318382263, -0.30515938997268677, 0.3658560514450073, -0.017474878579378128, 0.01512154471129179, 0.34169164299964905, 0.2562379837036133, 0.5194045305252075, 0.2775000333786011, -0.2784876525402069, 0.2923275828361511, 0.16303695738315582, -0.028043439611792...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Areablock#how-to-create-bricks-for-the-areablock
How to Create Bricks for the Areablock You can read about bricks in the Bricks section.
How to Create Bricks for the Areablock
[ -0.009727301076054573, -0.20272323489189148, -0.24804091453552246, 0.13717620074748993, 0.013079820200800896, -0.21494436264038086, 0.6660068035125732, -0.10785739123821259, 0.3179880678653717, 0.508543074131012, 0.016697542741894722, 0.33469676971435547, 0.12378262728452682, 0.07190150022...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Areablock#limit-certain-bricks-for-the-areablock
Limit certain Bricks for the Areablock You can limit certain bricks for the Areablock by using limits configurations.
Limit certain Bricks for the Areablock
[ -0.20214761793613434, -0.31748130917549133, -0.2985110282897949, 0.10196995735168457, 0.07184859365224838, -0.4127332866191864, 0.5368024110794067, 0.15311948955059052, 0.30042707920074463, 0.455964058637619, -0.1836358904838562, 0.12584595382213593, 0.08027774095535278, 0.1271428614854812...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Areablock#example
Example {{ pimcore_areablock("myAreablock", { "allowed": ["iframe","teasers","wysiwyg"], "limits": { "iframe": 1, "teasers": 2 }, "limit": 5 }) }}
Example
[ -0.1673741340637207, -0.4894602298736572, -0.19153675436973572, -0.17837302386760712, -0.15919673442840576, -0.40602943301200867, 0.6139398217201233, 0.13040167093276978, 0.1910937875509262, 0.1382296234369278, -0.05234833434224129, 0.36782559752464294, 0.08053344488143921, 0.3753251731395...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Areablock#using-manual-mode
Using Manual Mode The manual mode offers you the possibility to use areablocks with custom HTML, this is for example useful when using tables: {% set areaBlock = pimcore_areablock("myArea", {"manual":true}) %} {% do areaBlock.start() %} <table> {% for i in areaBlock.iterator %} {% set info = areaBlock.buildInfoObject() %} {% do areaBlock.blockConstruct() %} <tr> <td> {% set templateParams = areaBlock.blockStart(info) %} {% do areaBlock.content(info, templateParams) %} {% do areaBlock.blockEnd() %} </td> </tr> {% do areaBlock.blockDestruct() %} {% endfor %} </table> {% do areaBlock.end() %}
Using Manual Mode
[ -0.3117518126964569, -0.49455615878105164, -0.1620854139328003, -0.0422038808465004, -0.12222056090831757, -0.2515803873538971, 0.32210272550582886, 0.20573469996452332, -0.04645408317446709, 0.20705531537532806, -0.1490112841129303, 0.5112636685371399, 0.043436143547296524, 0.388841152191...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Areablock#accessing-data-within-an-areablock-element
Accessing Data Within an Areablock Element See Block for an example how to get elements from block and areablock editables.
Accessing Data Within an Areablock Element
[ -0.11768509447574615, -0.1411917805671692, -0.2978246212005615, 0.3387356400489807, 0.06084704399108887, -0.15455254912376404, 0.30523109436035156, 0.02420315518975258, 0.09283461421728134, 0.2936936914920807, -0.2780677080154419, 0.32134756445884705, 0.12147398293018341, 0.218433678150177...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Area#area-editable
Area Editable
Area Editable
[ 0.12164056301116943, -0.2840215861797333, -0.37499672174453735, 0.0021059762220829725, 0.05162981152534485, -0.21782127022743225, 0.198293074965477, 0.0936415046453476, -0.1334124505519867, 0.44783344864845276, -0.5689061880111694, 0.3743761479854584, -0.024308515712618828, 0.0669661536812...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Area#general
General The area editable is similar to the areablock editable, the only difference is that the area bricks are not wrapped into a block element, and the editor cannot choose which area is used, this has to be done in the editable configuration in the template.
General
[ 0.16350151598453522, -0.12781454622745514, -0.2938748300075531, -0.08878909796476364, -0.08020410686731339, 0.04758931323885918, 0.2902970612049103, 0.06201831251382828, 0.06340843439102173, 0.32179951667785645, -0.5533771514892578, 0.4538837969303131, -0.08556307107210159, -0.042393993586...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Area#configuration
Configuration Name Type Description type string ID of the brick which should be used in this area params array Optional Parameter see areablock for details class string A CSS class that is added to the surrounding container of this element in editmode
Configuration
[ -0.02449297159910202, -0.3594771921634674, -0.2275763601064682, 0.005455530248582363, -0.01798732578754425, -0.01933617703616619, 0.6716808080673218, -0.07990875095129013, 0.1513471007347107, 0.2718755304813385, 0.0871405377984047, 0.3057120740413666, 0.11462686955928802, -0.01921161450445...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Area#methods
Methods Name Return Description getElement($name) Document\Editable Retrieves an editable from within the actual area
Methods
[ 0.4514438509941101, 0.06083400920033455, -0.221128910779953, 0.037726029753685, 0.10067451745271683, -0.2818804085254669, 0.22504296898841858, 0.3813190460205078, -0.18390730023384094, 0.1716255247592926, -0.28823110461235046, 0.4042482078075409, 0.2408502697944641, 0.03207458183169365, ...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Area#example
Example <div> {{ pimcore_area('myArea', { 'type' : 'gallery-single-images' }) }} </div>
Example
[ -0.29416346549987793, -0.3025567829608917, -0.2501295804977417, 0.1128685250878334, 0.05818609148263931, -0.2867479622364044, 0.32767432928085327, 0.0804164931178093, -0.11352375894784927, 0.2919430434703827, -0.17146320641040802, 0.4336235225200653, 0.19165216386318207, 0.1266893744468689...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Area#example-with-parameters
Example with Parameters <div> {{ pimcore_area('myArea', { type: 'gallery-single-images', params: { 'gallery-single-images': { 'param1': 123, } } }) }} </div> Get the params in your brick: <div> {{ param1 }} </div>
Example with Parameters
[ -0.270589679479599, -0.158468097448349, -0.17791444063186646, 0.04849677532911301, 0.13314203917980194, -0.32766130566596985, 0.607222855091095, 0.027318008244037628, -0.0025346274487674236, 0.31548595428466797, -0.23530365526676178, 0.6301041841506958, 0.055746469646692276, 0.063767552375...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Area#accessing-data-within-an-area-element
Accessing Data Within an Area Element Assuming your area uses a brick gallery-single-images which contains a gallery block (see CMS demo): <?php // load document $document = \Pimcore\Model\Document\Page::getByPath('/en/basic-examples/galleries'); /** @var \Pimcore\Model\Document\Editable\Area $area */ $area = $document->getEditable('myArea'); /** @var \Pimcore\Model\Document\Editable\Block $block */ $block = $area->getElement('gallery'); ?> See Block for an example how to get elements from a block editable.
Accessing Data Within an Area Element
[ -0.28735819458961487, 0.20274361968040466, -0.2999221682548523, 0.38504308462142944, -0.08777919411659241, -0.04280669614672661, 0.2075168788433075, 0.19105376303195953, -0.07880867272615433, 0.35868099331855774, -0.38817140460014343, 0.3988184928894043, 0.14108458161354065, 0.024964299052...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Block#block-editable
Block Editable
Block Editable
[ 0.10995660722255707, -0.30018699169158936, -0.3233652412891388, -0.07137694954872131, 0.19128692150115967, -0.009230615571141243, 0.2535496950149536, 0.0727681890130043, 0.18009178340435028, 0.36550650000572205, -0.2677314877510071, 0.06267654895782471, -0.2475157082080841, 0.0704065710306...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Block#general
General The block element is an iterating component which is really powerful. Basically a block is only a loop, but you can use other editables within this loop, so it's possible to repeat a set of editables to create structured content (eg. a link list, or a image gallery). The items in the loop as well as their order can be defined by the editor with the block controls provided in the editmode.
General
[ 0.0725727379322052, -0.5592216849327087, -0.32028380036354065, 0.05527787655591965, 0.026408659294247627, 0.19313552975654602, 0.20640961825847626, 0.06854834407567978, 0.21168240904808044, 0.18458715081214905, -0.06497009098529816, -0.07228942215442657, -0.1748453974723816, 0.249164089560...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Block#configuration
Configuration Name Type Description limit integer Max. amount of iterations. reload bool Reload editmode on add, move or remove (default=false) default integer If block is empty, this specifies the iterations at startup. manual bool Forces the manual mode, which enables a complete custom HTML implementation for blocks, for example using <table> elements class string A CSS class that is added to the surrounding container of this element in editmode
Configuration
[ -0.08763879537582397, -0.585161030292511, -0.2863016128540039, -0.2676801383495331, -0.11949529498815536, -0.08948157727718353, 0.17352664470672607, 0.13181576132774353, 0.09793556481599808, 0.15431319177150726, 0.10199075192213058, 0.12775389850139618, -0.0982857495546341, 0.3393028676509...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Block#methods
Methods Name Return Description isEmpty() bool Whether the editable is empty or not. getCount() int Get the total amount of iterations. getCurrent() int Get the current index while looping. getElements() array Return a array for every loop to access the defined children.
Methods
[ 0.3056178689002991, -0.45360618829727173, -0.40987858176231384, 0.2598734200000763, 0.10694708675146103, 0.0062672970816493034, 0.12379401922225952, 0.12184441834688187, -0.022984758019447327, 0.15843752026557922, -0.4578399360179901, 0.37086939811706543, -0.09614534676074982, 0.0523382686...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Block#the-block-controls
The Block Controls Control Operation Add a new block at the current position. Remove the current block. Move Block up and down.
The Block Controls
[ 0.013537393882870674, -0.5841842889785767, -0.2323368787765503, -0.2337062805891037, -0.09271013736724854, -0.09641905128955841, 0.40320703387260437, 0.020771995186805725, 0.07243432849645615, 0.34888938069343567, 0.029415948316454887, 0.031272828578948975, 0.06754503399133682, 0.200045511...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Block#basic-usage
Basic Usage {% for i in pimcore_block('contentblock').iterator %} <h2>{{ pimcore_input('subline') }}</h2> {{ pimcore_wysiwyg('content') }} {% endfor %} The result in editmode should looks like to following: And in the frontend of the application:
Basic Usage
[ -0.02667994610965252, -0.49691104888916016, -0.15136674046516418, -0.1273447573184967, 0.024151679128408432, -0.11343438178300858, 0.4805833697319031, 0.08602403849363327, -0.1775549352169037, 0.07041510194540024, -0.17391549050807953, 0.44912591576576233, 0.18048495054244995, 0.0546073280...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Block#advanced-usage
Advanced Usage
Advanced Usage
[ 0.07071923464536667, -0.7435640692710876, -0.38957440853118896, 0.2574140429496765, -0.14905014634132385, -0.027481423690915108, 0.037328630685806274, -0.10988963395357132, -0.14995887875556946, 0.24772115051746368, 0.12620607018470764, 0.011846580542623997, 0.07295340299606323, 0.06116816...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Block#example-for-getcurrent()
Example for getCurrent() {% set myBlock = pimcore_block('contentblock', {'reload': true}) %} {% for i in myBlock.iterator %} {% if myBlock.current > 0 %} Insert this line only after the first iteration<br /> <br /> {% endif %} <h2>{{ pimcore_input('subline') }}</h2> {% endfor %} IMPORTANT If you want to change content structure dynamically for each index in editmode, then it is required to use reload=true config.
Example for getCurrent()
[ -0.2494940161705017, -0.47029873728752136, -0.13596168160438538, -0.07647158205509186, -0.21722747385501862, -0.2454604059457779, 0.23424258828163147, 0.12085487693548203, 0.0015755308559164405, 0.1812800168991089, -0.06765840947628021, 0.28616848587989807, 0.21537739038467407, 0.241358056...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Block#using-manual-mode
Using Manual Mode The manual mode offers you the possibility to deal with block the way you like, this is for example useful with tables: {% set block = pimcore_block('gridblock', {'manual' : true, 'limit' : 6}).start() %} <table> <tr> {% for b in block.iterator %} {% do block.blockConstruct() %} <td customAttribute="{{ pimcore_input("myInput").getData() }}"> {% do block.blockStart() %} <div style="width:200px; height:200px;border:1px solid black;"> {{ pimcore_input("myInput") }} </div> {% do block.blockEnd() %} </td> {% do block.blockDestruct() %} {% endfor %} </tr> </table> {% do block.end() %}
Using Manual Mode
[ -0.28807342052459717, -0.539738118648529, -0.19921360909938812, 0.10413599014282227, -0.04123621806502342, -0.25077876448631287, 0.3074283301830292, 0.05306822061538696, 0.046732980757951736, 0.3129515051841736, -0.07616571336984634, 0.20720615983009338, 0.04671650752425194, 0.438378274440...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Block#using-manual-mode-with-custom-button-position
Using Manual Mode with custom button position If you want to wrap buttons in a div or change the Position. {% set block = pimcore_block("gridblock", {"manual": true}).start() %} <table> <tr> {% for b in block.iterator %} {% do block.blockConstruct() %} <td customAttribute="{{ pimcore_input("myInput").data }}"> {% do block.blockStart(false) %} <div style="background-color: #fc0; margin-bottom: 10px; padding: 5px; border: 1px solid black;"> {% do block.blockControls() %} </div> <div style="width:200px; height:200px;border:1px solid black;"> {{ pimcore_input("myInput") }} </div> {% do block.blockEnd() %} </td> {% do block.blockDestruct() %} {% endfor %} </tr> </table> {% do block.end() %}
Using Manual Mode with custom button position
[ -0.3463692367076874, -0.5220162868499756, -0.18390513956546783, 0.11869020760059357, -0.019617926329374313, -0.26983511447906494, 0.3131404221057892, 0.1918937861919403, 0.1805802434682846, 0.21624280512332916, -0.07387074083089828, 0.24223561584949493, 0.1940605491399765, 0.40926119685173...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Block#using-manual-mode-with-additional-css-class-for-element-in-editmode
Using Manual Mode with additional css class for element in editmode {% set block = pimcore_block("gridblock", {"manual": true}).start() %} <div> {% for b in block.iterator %} {% do block.blockConstruct() %} {% do block.blockStart(true, false, 'my-additional-class') %} Add additional class 'my-addional-class' to editmode-div {% do block.blockEnd() %} {% do block.blockDestruct() %} {% endfor %} </div> {% do block.end() %}
Using Manual Mode with additional css class for element in editmode
[ -0.21263594925403595, -0.4062129855155945, -0.20070694386959076, 0.03473462164402008, 0.15566763281822205, 0.015211902558803558, 0.4989659786224365, 0.05853043496608734, -0.05600721389055252, 0.07270689308643341, -0.13727836310863495, 0.28033992648124695, -0.12641172111034393, 0.2743670940...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Block#accessing-data-within-a-block-element
Accessing Data Within a Block Element Bricks and structure refer to the CMS demo (content/default template). {# load document #} {% set document = pimcore_document_by_path('/en/More-Stuff/Developers-Corner/Galleries') %} {# get the first picture from the first "gallery-carousel" brick #} {% set image = document.getEditable('content').getElement('gallery-single-images')[5].getBlock('gallery').getElements()[0].getImage('image') %} {{ dump(document.getEditable('content').getElement('gallery-single-images')) }} {{ dump(image.getSrc()) }}
Accessing Data Within a Block Element
[ -0.12022857367992401, -0.10849234461784363, -0.26242515444755554, 0.4507087469100952, 0.09644460678100586, 0.049055103212594986, 0.3414996266365051, 0.20303931832313538, 0.1570853739976883, 0.3674784302711487, -0.24167677760124207, 0.14514432847499847, 0.21692140400409698, 0.01090871263295...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Checkbox#checkbox-editable
Checkbox Editable
Checkbox Editable
[ 0.21359369158744812, -0.2850358784198761, -0.30575796961784363, -0.03326568379998207, 0.14149612188339233, -0.06801283359527588, -0.0848921686410904, 0.21672025322914124, 0.28657206892967224, 0.4114261865615845, -0.4120216965675354, 0.439952552318573, -0.206412672996521, 0.4563136994838714...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Checkbox#configuration
Configuration Name Type Description reload boolean Set to true to reload the page in editmode after changing the state. label string a <label> which is added in the editmode class string A CSS class that is added to the surrounding container of this element in editmode
Configuration
[ 0.17891626060009003, -0.5439780950546265, -0.15683874487876892, -0.18520808219909668, -0.015063585713505745, -0.09274411201477051, 0.40496280789375305, 0.05107955262064934, -0.07616951316595078, -0.004668194800615311, -0.13203458487987518, 0.2274230271577835, 0.41767388582229614, 0.3682482...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Checkbox#methods
Methods Name Return Description isChecked() boolean Get status of the checkbox. isEmpty() boolean Whether the editable is empty or not (alias of isChecked())
Methods
[ 0.3739336431026459, -0.6144171357154846, -0.25275367498397827, -0.09601311385631561, -0.0687556192278862, 0.05652296170592308, 0.15792874991893768, 0.3234791159629822, 0.059873320162296295, 0.08503368496894836, -0.3872602581977844, 0.46898913383483887, -0.16713601350784302, 0.1888292431831...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Checkbox#simple-example
Simple Example {{ pimcore_checkbox('myCheckbox') }}
Simple Example
[ -0.169658824801445, -0.624890148639679, -0.21400249004364014, -0.09012748301029205, -0.001558808726258576, -0.29885637760162354, 0.1543431282043457, 0.21407023072242737, 0.12372636049985886, 0.4142850637435913, 0.08314070105552673, 0.5610316395759583, -0.11460026353597641, 0.48649683594703...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Checkbox#advanced-example
Advanced Example Setting XYZ: {{ pimcore_checkbox('myCheckbox') }} {% if pimcore_checkbox('myCheckbox').isChecked() %} <div> {{ dump('do something') }} </div> {% endif %}
Advanced Example
[ -0.1018674373626709, -0.7355360388755798, -0.09699264168739319, -0.27219271659851074, -0.033008646219968796, -0.34841233491897583, 0.21003185212612152, 0.32505789399147034, -0.00971919298171997, 0.16991697251796722, 0.014142738655209541, 0.40411823987960815, -0.18482369184494019, 0.5476177...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Date#date-editable
Date Editable
Date Editable
[ 0.14766785502433777, 0.03950776532292366, -0.3501953184604645, -0.15633635222911835, 0.1936272382736206, -0.1357162743806839, -0.011012174189090729, 0.031009986996650696, -0.03205227851867676, 0.358664870262146, -0.1760987639427185, 0.20886725187301636, -0.13158872723579407, -0.04531842842...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Date#configuration
Configuration Name Type Description format string A string which describes how to format the date in editmode outputFormat string A string which describes how to format the date in frontend, see possible formats class string A CSS class that is added to the surrounding container of this element in editmode
Configuration
[ 0.12097066640853882, -0.5998210906982422, -0.16187317669391632, -0.24459849298000336, 0.22700175642967224, 0.13248933851718903, 0.4169352650642395, 0.11761485040187836, -0.5079686045646667, 0.15520554780960083, 0.19963550567626953, -0.03784551844000816, 0.011875978671014309, 0.338767081499...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Date#methods
Methods Name Return Description isEmpty() boolean Whether the editable is empty or not
Methods
[ 0.3883970379829407, -0.4365713894367218, -0.2344721257686615, -0.06724323332309723, 0.009834113530814648, -0.11069561541080475, 0.14917980134487152, 0.3245706260204315, -0.36717689037323, 0.21433250606060028, -0.21327650547027588, 0.22401319444179535, -0.1754045933485031, 0.075197100639343...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Date#simple-example
Simple Example The following code will create a simple date widget in editmode. In frontend it will format the date as defined in format. Localization (output-format, ...) is automatically used from the globally registered locale. Please read the topic Localization. {{ pimcore_date('myDate', { 'format': 'd.m.Y', 'outputFormat': '%d.%m.%Y' }) }}
Simple Example
[ -0.13311564922332764, -0.283642441034317, -0.14419448375701904, -0.21968193352222443, 0.15321671962738037, -0.3589025139808655, 0.2819462716579437, -0.01976187527179718, -0.37604182958602905, 0.3741936683654785, -0.017692655324935913, 0.5069184303283691, 0.18485859036445618, 0.273746550083...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Relation_Many-To-One#relation-(many-to-one)-editable
Relation (Many-To-One) Editable
Relation (Many-To-One) Editable
[ 0.1181836947798729, -0.09053944051265717, -0.24622905254364014, 0.13806657493114471, 0.12711629271507263, -0.07242603600025177, 0.07356495410203934, -0.0404268242418766, -0.07022932916879654, 0.1498161256313324, -0.5587743520736694, 0.030840691179037094, 0.11468042433261871, -0.09846380352...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Relation_Many-To-One#general
General The relation editable provides the functionality to create a reference to an other element in Pimcore (document, asset, object). In frontend-mode this editable returns the path of the linked element.
General
[ -0.06776566058397293, -0.20105476677417755, -0.1519557237625122, -0.11259903758764267, 0.10857614129781723, -0.09675394743680954, -0.016335489228367805, -0.007665671873837709, -0.27186471223831177, 0.11138299107551575, -0.5612128973007202, 0.5305906534194946, 0.21397002041339874, 0.1174151...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Relation_Many-To-One#configuration
Configuration Name Type Description types array Allowed types (document, asset, object), if empty all types are allowed subtypes array Allowed subtypes grouped by type (folder, page, snippet, image, video, object, ...), if empty all subtypes are allowed (see example below) classes array Allowed object class names, if empty all classes are allowed reload boolean true triggers page reload on each change width int Width of the field in pixel. uploadPath string Target path for (inline) uploaded assets class string A CSS class that is added to the surrounding container of this element in editmode
Configuration
[ 0.08432237058877945, -0.3788036108016968, -0.19747312366962433, -0.062279947102069855, 0.2011055201292038, -0.13524195551872253, 0.36586520075798035, 0.15187133848667145, -0.3072740435600281, -0.049449339509010315, 0.03612328693270683, 0.1829882562160492, 0.07874289900064468, 0.34415856003...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Relation_Many-To-One#methods
Methods Name Return Description getElement() Element Get the assigned element getFullPath() string Get the full path of the assigned element. isEmpty() boolean Whether the editable is empty or not
Methods
[ 0.4417911767959595, -0.5284069776535034, -0.31330323219299316, 0.025440458208322525, 0.07064124196767807, -0.0026636074762791395, 0.13745234906673431, 0.2582831382751465, -0.1391892284154892, 0.08647679537534714, -0.2904372811317444, 0.43133488297462463, -0.1410936564207077, 0.055848713964...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Relation_Many-To-One#examples
Examples
Examples
[ 0.1105974018573761, -0.41019901633262634, -0.28510186076164246, 0.1324809491634369, -0.13995729386806488, -0.14305032789707184, 0.3125857710838318, 0.14037898182868958, -0.0417528860270977, 0.3020334243774414, 0.41210994124412537, 0.22653697431087494, -0.10223178565502167, -0.0599273890256...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Relation_Many-To-One#basic-usage
Basic usage You can just create the code line like, below: {{ pimcore_relation("myRelation") }} After, the view in the administration panel changes like in the picture:
Basic usage
[ -0.3659563362598419, 0.07444672286510468, -0.17812825739383698, -0.027933470904827118, -0.04095495119690895, -0.43088796734809875, 0.2384512573480606, -0.09101936966180801, -0.07688022404909134, 0.25025424361228943, -0.25178104639053345, 0.4513760209083557, 0.2664564847946167, 0.1737497150...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Relation_Many-To-One#using-restriction
Using Restriction If you want specify elements which could be assigned to the relation editable, use types, subtypes and classes options in the editable configuration.
Using Restriction
[ 0.1882612109184265, -0.02056586742401123, -0.2306574285030365, -0.03431976959109306, 0.2332231104373932, -0.09041116386651993, 0.18958930671215057, 0.06984802335500717, -0.03411592170596123, 0.10868997871875763, -0.47087010741233826, 0.16503573954105377, 0.08245101571083069, 0.046210225671...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Relation_Many-To-One#example
Example {{ pimcore_relation("myRelation",{ "types": ["asset","object"], "subtypes": { "asset": ["video", "image"], "object": ["object"], }, "classes": ["person"] }) }} We restricted the myRelation editable to the following entities: Video / Image (Assets) Person Objects (\Pimcore\Model\DataObject\Person) (Objects) As you see in the picture below, it's impossible to drop any other type to that editable.
Example
[ -0.08935639262199402, -0.07149264961481094, -0.10090116411447525, 0.23224937915802002, 0.25909435749053955, -0.17846986651420593, -0.01307123713195324, 0.14685890078544617, -0.3018406331539154, 0.07575689256191254, -0.8980506062507629, 0.5573655962944031, 0.09417244046926498, 0.03121344558...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Relation_Many-To-One#download-example
Download Example Another useful use-case for the relation editable is a download link. {% if editmode %} {{ pimcore_relation("myRelation") }} {% else %} {% if pimcore_relation("myRelation").getElement() is instanceof('\\Pimcore\\Model\\Asset') %} <a href="{{ pimcore_relation("myRelation").getFullPath() }}">{{ "Download" | trans }}</a> {% endif %} {% endif %}
Download Example
[ -0.12127359211444855, -0.12300945818424225, -0.15874093770980835, -0.06203779950737953, 0.2147769331932068, -0.19616106152534485, 0.019691023975610733, 0.16041642427444458, -0.07082193344831467, 0.12204033881425858, -0.27927207946777344, 0.41620761156082153, 0.1934768110513687, 0.146219715...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Relations_Many-To-Many#relations-(many-to-many)-editable
Relations (Many-To-Many) Editable
Relations (Many-To-Many) Editable
[ 0.08360206335783005, -0.0824727788567543, -0.26570725440979004, 0.2211586982011795, 0.14252927899360657, -0.11909282207489014, 0.12624800205230713, 0.0033177242148667574, 0.10037841647863388, 0.04404383897781372, -0.6065539717674255, -0.01938101276755333, 0.16808100044727325, -0.1018682345...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Relations_Many-To-Many#general
General The relations editable provides many to many relation to other Pimcore elements (document, asset, object).
General
[ -0.2816469967365265, -0.14461280405521393, -0.2816113829612732, 0.06739109754562378, 0.14294880628585815, -0.10881635546684265, 0.2068338394165039, -0.0179072767496109, -0.25129321217536926, 0.07352948188781738, -0.5073699951171875, 0.3195224404335022, 0.21328669786453247, 0.14325246214866...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Relations_Many-To-Many#configuration
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 disableInlineUpload boolean Disable the inline upload for assets. If set to true, the inline upload functionality will be disabled. types array Allowed types (document, asset, object), if empty all types are allowed subtypes array Allowed subtypes grouped by type (folder, page, snippet, image, video, object, ...), if empty all subtypes are allowed (see example below) classes array Allowed object class names, if empty all classes are allowed class string A CSS class that is added to the surrounding container of this element in editmode reload boolean true triggers page reload on each change
Configuration
[ 0.05645570904016495, -0.3996845483779907, -0.13771958649158478, -0.0637737438082695, 0.16385336220264435, -0.1924833506345749, 0.4560061991214752, 0.2217494249343872, -0.1612558513879776, 0.06750591099262238, -0.0018016559770330787, 0.2196018397808075, 0.17021878063678741, 0.32024553418159...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Relations_Many-To-Many#methods
Methods Name Return Description getElements() array Array of the assigned elements current() int Get the current index while looping isEmpty() boolean Whether the editable is empty or not
Methods
[ 0.3552275598049164, -0.43265509605407715, -0.4144982397556305, -0.010345143266022205, -0.05202873423695564, 0.024129247292876244, 0.1193087100982666, 0.21225054562091827, 0.13856567442417145, 0.1356746256351471, -0.4131621718406677, 0.35083165764808655, -0.07433401793241501, 0.063209675252...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Relations_Many-To-Many#example
Example
Example
[ -0.039029549807310104, -0.4887920916080475, -0.3070780634880066, 0.04008098319172859, -0.14495046436786652, -0.15570281445980072, 0.2727290093898773, 0.16836415231227875, -0.006077707279473543, 0.44112470746040344, 0.5344760417938232, 0.21058650314807892, -0.14281579852104187, 0.0040315156...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Relations_Many-To-Many#basic-usage
Basic Usage The code below is responsible for showing a list of elements types related to the relations editable. <p>{{ "Types of elements" | trans }}:</p> {% if editmode %} {{ pimcore_relations("objectPaths") }} {% else %} <ul> {% for element in pimcore_relations("objectPaths") %} <li>{{ element.getType() }}</li> {% endfor %} </ul> {% endif %} Picture below, presents the editmode preview: The frontend part looks like that: To better understand what exactly is the $element variable, have a look at the output below: array(6) { [0] => string(27) "Pimcore\Model\DataObject\Folder" [1] => string(32) "Pimcore\Model\DataObject\BlogArticle" [2] => string(32) "Pimcore\Model\DataObject\BlogArticle" [3] => string(27) "Pimcore\Model\Document\Page" [4] => string(27) "Pimcore\Model\Document\Page" [5] => string(25) "Pimcore\Model\Asset\Image" }
Basic Usage
[ -0.034765057265758514, -0.2353743463754654, -0.23394747078418732, 0.31132760643959045, 0.16703474521636963, -0.12515777349472046, 0.09913203865289688, 0.26316800713539124, -0.016165243461728096, 0.12271080911159515, -0.3686845302581787, 0.40776753425598145, 0.1372302621603012, 0.3367757797...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Relations_Many-To-Many#example-with-allowed-types-and-subtypes
Example with allowed types and subtypes Similar to the single relation editable, this editable also could specify allowed types, subtypes and classes. For example: {{ pimcore_relations("objectPaths", { "types": ["asset","object"], "subtypes": { "asset": ["video","image"], "object": ["object"] }, "classes": ["person"] }) }} Now, a user is not able to add other elements than specified in the types configuration part.
Example with allowed types and subtypes
[ -0.16628798842430115, -0.09509484469890594, -0.1449964940547943, -0.029967492446303368, 0.20781980454921722, -0.09639108180999756, 0.19523771107196808, 0.013036985881626606, -0.15063029527664185, -0.0007092021405696869, -0.6510401368141174, 0.3556345999240875, -0.1389467716217041, 0.303987...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Image#image-editable
Image Editable
Image Editable
[ 0.07575066387653351, -0.2590041756629944, -0.42166540026664734, 0.048070188611745834, 0.11495305597782135, -0.000755832064896822, 0.11562741547822952, 0.059511374682188034, -0.16834363341331482, 0.3474169075489044, -0.3519147038459778, 0.18410204350948334, -0.12360905855894089, -0.08555942...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Image#description
Description The image editable adds a placeholder for images out of the assets module. The biggest advantages of using that instead of (for example) the relation editable: You are able to specify generated thumbnail properties (including high-res) There is an image preview rendered in the administration panel You can specify additional attributes for generated <img> or <picture> You can crop the image directly inline You can put hotspots and markers on the actual image
Description
[ 0.051005326211452484, -0.1542939394712448, -0.2067938894033432, -0.11287637799978256, -0.06039104610681534, 0.15632110834121704, 0.23277148604393005, 0.22542203962802887, -0.16212233901023865, 0.25004589557647705, -0.34618157148361206, 0.30673539638519287, -0.02558581717312336, -0.10418071...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Image#configuration
Configuration Name Type Description title string You can give the image widget in editmode a title. Using the new style this title is displayed as a tooltip. width integer Width of the image in pixel height integer Height of the image in pixel thumbnail string|array Name of the configured thumbnail as string or a thumbnail config as array hidetext boolean Hides the input for the ALT-text in editmode reload boolean Set true to reload the page in editmode after updating the image minWidth integer Min. width of the image (in pixel) minHeight integer Min. height of the image (in pixel) ratioX integer Set width in pixel to make sure a fixed aspect ratio size is choosen in the crop tool. Must be used with ratioY. ratioY integer Set height in pixel to make sure a fixed aspect ratio size is choosen in the crop tool. Must be used with ratioX. uploadPath string Target path for (inline) uploaded images. The target folder(s) will be created on the fly, if doesn't exist. disableInlineUpload boolean Disable the inline upload. If set to true, the inline upload functionality will be disabled. highResolution float Factor the thumbnail dimensions should be multiplied with (html attributes width and height contain the original dimensions ... used for Retina displays, print, ...) dropClass string This option can be used to add multiple alternative drop-targets and context menus on custom HTML elements in your code. Just add the class specified here also to custom HTML elements and they will get a drop target too. deferred bool Set to false to disable deferred (on demand) thumbnail rendering class string A CSS class that is added to the surrounding container of this element in editmode predefinedDataTemplates array Add predefined config sets for hotspots and images cacheBuster bool (default: false) Add cache-buster prefix with modificationDate timestamp required bool (default: false) set to true to make field value required for publish Additionally you can also pass any valid attribute for Thumbnail::getHtml().
Configuration
[ 0.050167836248874664, -0.31460461020469666, -0.14296744763851166, -0.2339458018541336, -0.08408074826002121, -0.14404775202274323, 0.2565418481826782, 0.24855361878871918, -0.12366940826177597, 0.012765509076416492, -0.11880247294902802, 0.38657981157302856, 0.06358245760202408, 0.28252944...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Image#methods
Methods Name Arguments Return Description getThumbnail($name) (string/array) $name Pimcore\Model\Asset\Image\Thumbnail Get a specific thumbnail of the image getText() / getAlt() - string, alt/title text from the image The entered alternative text in the widget getSrc() - string, absolute path to the image The path to the original image which is referenced getImage() - \Pimcore\Model\Asset\Image The asset object which is referenced (\Pimcore\Model\Asset\Image) getHotspots() - array Returns the hotspot data (see example below) getMarker() - array Returns the marker data (see example below) isEmpty() - bool Whether the editable is empty or not
Methods
[ 0.13654328882694244, -0.34179791808128357, -0.21531522274017334, 0.30427858233451843, -0.09327486902475357, -0.10897504538297653, 0.22872294485569, 0.25687265396118164, -0.2343444973230362, 0.08103175461292267, -0.31556177139282227, 0.5663191676139832, 0.06342308968305588, -0.0717661380767...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Image#examples
Examples
Examples
[ 0.1105974018573761, -0.41019901633262634, -0.28510186076164246, 0.1324809491634369, -0.13995729386806488, -0.14305032789707184, 0.3125857710838318, 0.14037898182868958, -0.0417528860270977, 0.3020334243774414, 0.41210994124412537, 0.22653697431087494, -0.10223178565502167, -0.0599273890256...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Image#basic-usage
Basic usage {{ pimcore_image("myImage") }} The code above generates an image area in the backend and displays the image at the frontend. The empty backend area: The filled backend area:
Basic usage
[ -0.1874544769525528, -0.36939066648483276, -0.20162124931812286, 0.037162914872169495, -0.1699904352426529, -0.4065718650817871, 0.3166372776031494, -0.01236612256616354, -0.17985206842422485, 0.3272218704223633, 0.18706852197647095, 0.32813164591789246, 0.3667081296443939, 0.1920874714851...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Image#advanced-usage
Advanced Usage In the example below you can see how to add a title and specify size of the image area. Note that if you use the thumbnail argument, the rendered image on the frontend will use the specified thumbnail. Learn more about thumbnails here: Image Thumbnails. {{ pimcore_image("myImage", { "title": "Drag your image here", "width": 200, "height": 200, "thumbnail": "contentimages" }) }}
Advanced Usage
[ -0.042835477739572525, -0.22674725949764252, -0.1864536851644516, -0.08693496137857437, 0.015028796158730984, -0.30066272616386414, 0.12591013312339783, -0.07851476967334747, -0.3575155436992645, 0.39187657833099365, 0.08616451919078827, 0.40248075127601624, 0.2277260720729828, 0.094401977...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Image#backend-preview
Backend Preview
Backend Preview
[ -0.37883806228637695, -0.34011727571487427, -0.32454657554626465, -0.1260341852903366, 0.001499177422374487, -0.24890142679214478, 0.39646318554878235, 0.2953338027000427, -0.026661762967705727, 0.3202827274799347, -0.007361109834164381, -0.033995047211647034, 0.03385144844651222, 0.488400...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Image#an-example-with-a-direct-thumbnail-configuration
An Example with a Direct Thumbnail Configuration You can also change the thumbnail configuration: {{ pimcore_image("myImage", { "title": "Drag your image here", "width": 200, "height": 200, "thumbnail": { "width": 200, "height": 200, "interlace": true, "quality": 90 } }) }} And this is how the rendered html looks: <img custom-attr="value" data-role="image" src="/var/tmp/image-thumbnails/0/56/thumb__content/dsc03807.jpeg" />
An Example with a Direct Thumbnail Configuration
[ -0.10197615623474121, -0.41858842968940735, -0.1744026392698288, -0.052588362246751785, -0.008330296725034714, -0.35856807231903076, 0.12384908646345139, 0.18506105244159698, -0.38857877254486084, 0.17995068430900574, -0.14169692993164062, 0.4324987828731537, 0.25707805156707764, 0.1799525...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Image#other-advanced-examples
Other Advanced Examples {# Get retina image #} {{ pimcore_image("myImage", { "thumbnail": { "width": 200, "height": 200 }, "highResolution": 2 }) }} {# Will output<img src="/var/thumb_9999__auto_xxxxxxxx@2x.png" width="200" height="200" /> <!-- but the real image size is 400x400 pixel --> #} {# Custom image tag (thumbnail objects) #} {% if editmode %} {{ pimcore_image("myImage",{"thumbnail": "myThumbnail"}) }} {% else %} {% set thumbnail = pimcore_image("myImage").getThumbnail("myThumbnail") %} <img src="{{ thumbnail }}" width="{{ thumbnail.width }}" height="{{ thumbnail.height }}" /> {% endif %} {# Custom drop targets #} <div class="myCustomImageDropTarget anotherClass">My first alternative drop target</div> {{ pimcore_image("image",{ "thumbnail": "contentfullimage", "dropClass": "myCustomImageDropTarget" }) }} <div class="myCustomImageDropTarget someClass">My second alternative drop target</div>
Other Advanced Examples
[ -0.10779907554388046, -0.4063992500305176, -0.19664834439754486, 0.05096817389130592, -0.1410125494003296, -0.4277653992176056, 0.28574883937835693, 0.16452398896217346, -0.26828816533088684, 0.14913861453533173, -0.1342078000307083, 0.4873392879962921, 0.05386822670698166, 0.2110188603401...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Image#field-specific-image-cropping-for-documents
Field-specific Image Cropping for Documents
Field-specific Image Cropping for Documents
[ -0.19860556721687317, -0.005562315229326487, -0.15016506612300873, -0.058927152305841446, -0.24108074605464935, -0.4323514699935913, 0.30205127596855164, 0.377859503030777, -0.11821295320987701, 0.15466399490833282, 0.4334636628627777, 0.12110600620508194, 0.05496542155742645, 0.0415177084...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Image#backend-usage
Backend Usage Right-click on the image editable in editmode and press Select specific area of image Now you're able to select the desired area on the image: Therefore, there is no need any more to define specific images or thumbnails if a specific region of an image should be displayed. Just assign the original image and define field specific cropping directly within the document.
Backend Usage
[ 0.1140599399805069, -0.12403972446918488, -0.23145699501037598, -0.09488683193922043, -0.294027179479599, -0.4658650755882263, 0.40786802768707275, 0.20808643102645874, -0.10796132683753967, 0.2081923484802246, 0.09066406637430191, 0.2849482297897339, 0.22472915053367615, 0.131253808736801...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Image#markers-&-hotspots
Markers & Hotspots This functionality is available on every image editable (no configuration necessary). Setting a marker or a hotspot on an image has no direct effect on the output, the assigned image is displayed as usual. You as a developer have to get the data out of the image editable to build amazing frontends with it. You can get the data with the methods getMarker() and getHotspots(). All dimensions are in percent and therefore independent from the image size, you have to change them back to pixels according to your image size.
Markers & Hotspots
[ -0.13844256103038788, -0.4937925636768341, -0.24302156269550323, -0.03722955659031868, 0.04157612845301628, -0.3088868260383606, 0.5312948226928711, -0.017298957332968712, 0.05337243527173996, 0.08382054418325424, 0.027646668255329132, 0.3930923044681549, -0.09885679930448532, 0.2556333243...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Image#code-usage-example
Code Usage Example <div> <p> {{ pimcore_image("myImage",{ "title": "Drag your image here", "width": 400, "height": 400, "thumbnail": "content" }) }} {% if not editmode %} {% set image = pimcore_image("myImage") %} {% if image.getHotspots() %} {{ dump(image.getHotspots()) }} {% endif %} {% if image.getMarker() %} {{ dump(image.getMarker()) }} {% endif %} {% endif %} </p> </div> {# Predefined Data Templates; use "hotspot" instead of the "marker" key to add templates for hotspots #} {{ pimcore_image("image", { 'thumbnail': 'my-thumbnail', 'predefinedDataTemplates': { 'marker': [ { 'menuName': 'Menu Name', 'name': 'Config Name', 'data': [ { 'name': 'my textfield', 'type': 'textfield', } ] } ] } }) }} getHotspots output: array(1) { [0] => array(6) { ["top"] => float(36.8) ["left"] => float(39.5) ["width"] => int(5) ["height"] => float(6.6666666666667) ["data"] => array(2) { [0] => object(Pimcore\Model\Element\Data\MarkerHotspotItem)#171 (3) { ["name"] => string(30) "checkbox_data_added_to_hotspot" ["type"] => string(8) "checkbox" ["value"] => bool(true) } [1] => object(Pimcore\Model\Element\Data\MarkerHotspotItem)#172 (3) { ["name"] => string(28) "object_data_added_to_hotspot" ["type"] => string(6) "object" ["value"] => int(6) } } ["name"] => NULL } } getMarker output: array(1) { [0] => array(4) { ["top"] => float(35.466666666667) ["left"] => float(69.9) ["data"] => array(1) { [0] => object(Pimcore\Model\Element\Data\MarkerHotspotItem)#173 (3) { ["name"] => string(31) "Textarea data added to the marker" ["type"] => string(8) "textarea" ["value"] => string(38) "Here is a description of marked place." } } ["name"] => NULL } }
Code Usage Example
[ -0.2155940681695938, -0.6183549165725708, -0.2705819308757782, 0.05978050455451012, 0.0406213216483593, -0.1737401783466339, 0.2079700529575348, 0.2983359694480896, -0.04127166420221329, 0.13114751875400543, 0.014631986618041992, 0.3943721354007721, 0.12882255017757416, 0.1512841135263443,...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Input#input-editable
Input Editable
Input Editable
[ 0.2665972113609314, -0.3734533488750458, -0.36736178398132324, -0.16663752496242523, 0.4055826663970947, -0.05706191435456276, 0.17651110887527466, 0.09321647137403488, -0.12424566596746445, 0.3010083734989166, -0.3151760995388031, 0.28458213806152344, -0.12801076471805573, 0.1652688831090...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Input#general
General The input editable is a single line unformatted text placeholder (just as HTMLs <input> is), which is useful for text headlines, paragraphs and other values. For a multi-line alternative have a look at the textarea editable.
General
[ 0.26639631390571594, -0.43953731656074524, -0.183643639087677, -0.384884774684906, 0.3656088411808014, 0.17795488238334656, 0.2564311921596527, 0.035124521702528, -0.19971610605716705, 0.33028340339660645, -0.12405923008918762, 0.0535442978143692, 0.13095621764659882, 0.11591435223817825, ...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Input#configuration
Configuration Name Type Configuration width integer Width of the input in editmode (in pixels) htmlspecialchars boolean Set to false to get the raw value without HTML special chars like & (default to true) nowrap boolean set to false to disable the automatic line break class string A CSS class that is added to the surrounding container of this element in editmode placeholder string A placeholder that is displayed when the field is empty required boolean set to true to make field value required for publish
Configuration
[ 0.17877089977264404, -0.5060537457466125, -0.22669586539268494, -0.12366112321615219, 0.1739838570356369, -0.07196641713380814, 0.30767950415611267, 0.2432989925146103, -0.22073747217655182, 0.3123149573802948, 0.2433890849351883, 0.1149105355143547, 0.21418292820453644, 0.2800033092498779...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Input#methods
Methods Name Return Description getData() string Value of the input, this is useful to get the value even in editmode. isEmpty() boolean Whether the editable is empty or not
Methods
[ 0.3082056939601898, -0.4188915193080902, -0.3209618628025055, -0.05363011360168457, 0.11522186547517776, -0.11147697269916534, 0.21432003378868103, 0.28603124618530273, -0.31062501668930054, 0.13545598089694977, -0.3325434923171997, 0.43989911675453186, -0.0403313972055912, 0.1592485308647...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Input#example
Example
Example
[ -0.039029549807310104, -0.4887920916080475, -0.3070780634880066, 0.04008098319172859, -0.14495046436786652, -0.15570281445980072, 0.2727290093898773, 0.16836415231227875, -0.006077707279473543, 0.44112470746040344, 0.5344760417938232, 0.21058650314807892, -0.14281579852104187, 0.0040315156...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Input#basic-usage
Basic usage <h2> {{ pimcore_input("myHeadline") }} </h2> The above code generates an editable area which you can fill with the text, see:
Basic usage
[ -0.10405649244785309, -0.5212389230728149, -0.15961666405200958, -0.20830808579921722, -0.11351872980594635, -0.39694494009017944, 0.3312244117259979, -0.1378096342086792, -0.08686195313930511, 0.30244362354278564, 0.12561605870723724, 0.4272325038909912, 0.3777264952659607, 0.264952749013...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Input#advanced-usage
Advanced usage You could also specify other parameters, like the size: <h2> {{ pimcore_input("headerLine", {'width': 540}) }} </h2>
Advanced usage
[ -0.3777346909046173, -0.7571333646774292, -0.20055533945560455, -0.17600928246974945, 0.21404635906219482, -0.6157906651496887, 0.33465325832366943, 0.0459151417016983, -0.21308700740337372, 0.30921822786331177, 0.21739561855793, 0.04455401003360748, 0.2833455204963684, 0.4014166593551636,...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Link#link-editable
Link Editable
Link Editable
[ 0.16827501356601715, -0.16702237725257874, -0.30473142862319946, -0.034934788942337036, 0.2131413370370865, -0.05924585461616516, 0.0020772397983819246, 0.11462178826332092, 0.06473924964666367, 0.2726641595363617, -0.4576479196548462, 0.28590935468673706, -0.08358815312385559, -0.05288865...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Link#general
General The link editable is used for dynamic link creation in documents.
General
[ 0.09589537978172302, -0.33736494183540344, -0.2036186009645462, -0.3602391183376312, 0.0011370517313480377, 0.03636353835463524, 0.11093804240226746, 0.12129728496074677, -0.11732803285121918, 0.27091577649116516, -0.1789272278547287, 0.31324297189712524, -0.024735169485211372, 0.101446732...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Link#configuration
Configuration You can pass nearly every valid attribute an <a>-tag can have (w3.org - Link), such as: class, target, id, style, accesskey, name, title, data-*, aria-* and additionally the following: Name Type Description reload boolean Set to true to reload the page in editmode after changing the state. textPrefix string Add an icon or something else before Text. textSuffix string Add an icon or something else after Text. noText boolean If you need only the <a> tag without text (or only with an textSuffix/textPrefix). required boolean/string (default: false) set to true to make link and text required for publish, set to linkonly to make only the link required for publish. allowedTypes array You can limit the available types for this editable by passing the allowed types explicitly. If this option is not used, all types are available. Valid types are: asset, document, object allowedTargets array You can limit the available targets for this editable by passing the allowed targets explicitly. If this option is not used, all targets are available. Valid targets are: (empty string), _blank, _self, _top, _parent disabledFields array You can limit the available fields for this editable by passing the allowed fields explicitly. If this option is not used, all fields are available. Valid Fields are: text, target, parameters, anchor, title, accesskey, rel, tabindex, class, attributes For security reasons we created an For security reasons we created an allow list to filter harmfull html attributes. For example all on* attributes will be filtered out!
Configuration
[ 0.24209709465503693, -0.289471298456192, -0.15132325887680054, -0.09722532331943512, 0.2466033697128296, -0.3362896740436554, 0.18676838278770447, 0.35273221135139465, 0.07910356670618057, 0.06542433053255081, -0.16924899816513062, 0.28924426436424255, 0.049892358481884, 0.2083766460418701...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Link#methods
Methods Name Return Description getHref() string Get the path of this link getText() string Get the text of the link getTarget() string Get the target of the link getParameters() string Get the query params of the link getAnchor() string Get the anchor text of the link getTitle() string Get the title of the link getRel() string Get the rel text of the link getTabindex() string Get the tabindex of the link getClass() string Get the class of the link getAccessKey() string Get the access key of the link isEmpty() string Whether the editable is empty or not
Methods
[ 0.27437952160835266, -0.4882100224494934, -0.2596164047718048, 0.21417658030986786, 0.08906886726617813, 0.050143204629421234, 0.12269619107246399, 0.3930203318595886, -0.07520382851362228, 0.05716821551322937, -0.5393141508102417, 0.39895251393318176, 0.0453568734228611, -0.15671718120574...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Link#examples
Examples
Examples
[ 0.1105974018573761, -0.41019901633262634, -0.28510186076164246, 0.1324809491634369, -0.13995729386806488, -0.14305032789707184, 0.3125857710838318, 0.14037898182868958, -0.0417528860270977, 0.3020334243774414, 0.41210994124412537, 0.22653697431087494, -0.10223178565502167, -0.0599273890256...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Link#basic-usage
Basic Usage <p> {{ "Visit our" | trans }} {{ pimcore_link('blogLink') }} </p> You could see the backend preview in the picture, below. And the frontend:
Basic Usage
[ -0.12030061334371567, -0.5431603193283081, -0.17811088263988495, -0.15591000020503998, 0.28147903084754944, -0.4583835005760193, -0.02363116294145584, -0.05895444378256798, -0.16878385841846466, 0.17723426222801208, -0.0908433049917221, 0.4327448904514313, 0.15783172845840454, 0.2248655259...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Link#use-link-in-the-block-editable
Use Link in the Block Editable Let's see how to make a list of links with Block. <h3>{{ "Useful links" | trans }}</h3> <ul> {% for i in pimcore_block('linkblock').iterator %} <li>{{ pimcore_link('myLink', {'class': "special-link-class"}) }}</li> {% endfor %} </ul> The above example renders a list of links:
Use Link in the Block Editable
[ -0.14132489264011383, -0.38104626536369324, -0.2567901015281677, 0.04633110389113426, 0.17412421107292175, -0.07916276156902313, 0.13847175240516663, 0.07041972875595093, 0.03915243595838547, 0.16770543158054352, -0.31314703822135925, 0.5832324028015137, -0.1453973352909088, 0.050323814153...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Link#link-generators
Link Generators Please also see the section about Link Generators
Link Generators
[ -0.06871291995048523, -0.3306467831134796, -0.3301086723804474, -0.02631792053580284, 0.10216500610113144, -0.29370519518852234, 0.2667296528816223, -0.06496075540781021, 0.09238899499177933, 0.2386464923620224, -0.07374066114425659, 0.08644226938486099, -0.09858942776918411, 0.02726933173...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Multiselect#multiselect-editable
Multiselect Editable
Multiselect Editable
[ 0.014809154905378819, -0.2521039843559265, -0.29269757866859436, 0.02771356888115406, -0.03861118108034134, -0.2244313657283783, 0.12268562614917755, -0.055799949914216995, -0.21592669188976288, 0.3187098503112793, -0.44673410058021545, 0.5851567387580872, -0.20048333704471588, 0.280070692...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Multiselect#general
General The Multiselect editable generates a multiselect box component in editmode.
General
[ -0.16122543811798096, -0.23392988741397858, -0.18216466903686523, -0.0737442821264267, -0.1464185267686844, -0.19935666024684906, 0.4589206576347351, 0.038444388657808304, -0.21628253161907196, 0.122164286673069, -0.11984069645404816, 0.4332371652126312, -0.15645954012870789, 0.39831233024...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Multiselect#configuration
Configuration Name Type Description store array Key/Value pairs for the available options. width integer Width of a generated block in editmode height integer Height of a generated block in editmode class string A CSS class that is added to the surrounding container of this element in editmode
Configuration
[ -0.014813543297350407, -0.5904887318611145, -0.23804160952568054, 0.10236935317516327, 0.15467797219753265, 0.24891842901706696, 0.2973058223724365, 0.03224761039018631, -0.035804279148578644, 0.24428775906562805, 0.04155711457133293, -0.14839500188827515, 0.0014130058698356152, 0.34198755...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Multiselect#methods
Methods Name Return Description getData() array Returns array of values chosen in the editmode. isEmpty() boolean Whether the editable is empty or not
Methods
[ 0.3576890230178833, -0.4044061601161957, -0.37717241048812866, 0.02200990356504917, 0.008749441243708134, -0.0713423565030098, 0.14095044136047363, 0.31364309787750244, -0.2343578040599823, 0.13329464197158813, -0.30551186203956604, 0.42002546787261963, -0.09798320382833481, 0.097079180181...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Multiselect#example
Example The code below renders a multiselectbox in the backend. Also, it shows the list of chosen elements in the frontend. {% if editmode %} {{ pimcore_multiselect('categories', { 'width': 200, 'height': 100, 'store': [ ['cars', 'Cars'], ['motorcycles', 'Motorcycles'], ['accessories', 'Accessories'], ] }) }} {% else %} <p>{{ 'This page is linked to' | trans }} {% for categoryKey in pimcore_multiselect('categories').getData %} <span> {{ categoryKey | trans }} </span> {% endfor %} categories </p> {% endif %} The editmode preview: In the frontend you can find the rendered text with the categories you have chosen in the editmode:
Example
[ -0.1475529819726944, -0.3346429765224457, -0.18309806287288666, 0.2582278847694397, -0.10973186790943146, -0.3868243098258972, 0.17682313919067383, 0.15736889839172363, -0.2816699743270874, 0.11518680304288864, -0.18273597955703735, 0.7655343413352966, 0.10241198539733887, 0.28924205899238...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Numeric#numeric-editable
Numeric Editable
Numeric Editable
[ 0.04179360345005989, -0.41721031069755554, -0.24756571650505066, -0.03213261812925339, 0.4579186737537384, -0.053424470126628876, 0.13900884985923767, -0.022317709401249886, -0.2524743378162384, 0.4496029317378998, -0.4892924129962921, 0.31743884086608887, -0.06778935343027115, 0.235589936...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Numeric#general
General The numeric editable is very similar to the input editable, but with special configurations for the use with numbers.
General
[ 0.19174031913280487, -0.4022371470928192, -0.30185040831565857, -0.2722291946411133, 0.23353776335716248, -0.016852648928761482, 0.21398617327213287, -0.03843322768807411, -0.32096707820892334, 0.35255712270736694, -0.5550256967544556, 0.2996171712875366, -0.08338946849107742, 0.1515937894...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Numeric#configuration
Configuration Name Type Description maxValue float Define a maximum value minValue float Define a minimum value width integer Width of the field in pixel class string A CSS class that is added to the surrounding container of this element in editmode required boolean set to true to make field value required for publish
Configuration
[ 0.18463660776615143, -0.5049529075622559, -0.15967760980129242, -0.24200017750263214, 0.14489178359508514, -0.1392946094274521, 0.25601068139076233, 0.006844121031463146, -0.3482944965362549, 0.4226731061935425, 0.3831618130207062, 0.11669552326202393, 0.19426263868808746, 0.43402913212776...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Numeric#methods
Methods Name Return Description getData() int,float Value of the numeric field, this is useful to get the value even in editmode isEmpty() boolean Whether the editable is empty or not
Methods
[ 0.15219363570213318, -0.43772900104522705, -0.33689165115356445, -0.048664357513189316, 0.14524489641189575, -0.12146598845720291, 0.17190565168857574, 0.273177832365036, -0.3007485270500183, 0.14245039224624634, -0.3415191173553467, 0.5151875615119934, 0.03269291669130325, 0.1827729195356...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Numeric#examples
Examples
Examples
[ 0.1105974018573761, -0.41019901633262634, -0.28510186076164246, 0.1324809491634369, -0.13995729386806488, -0.14305032789707184, 0.3125857710838318, 0.14037898182868958, -0.0417528860270977, 0.3020334243774414, 0.41210994124412537, 0.22653697431087494, -0.10223178565502167, -0.0599273890256...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Numeric#basic-usage
Basic Usage {{ pimcore_numeric('myNumber') }} Now you can see the numeric value in the editmode view
Basic Usage
[ -0.3419111371040344, -0.4604553282260895, -0.24620144069194794, 0.02278151549398899, 0.2796846330165863, -0.3813570737838745, 0.2932422459125519, 0.030477508902549744, -0.4921444356441498, 0.4325081408023834, -0.2547997534275055, 0.6632746458053589, 0.10004975646734238, 0.2750034034252167,...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Numeric#advanced-usage
Advanced Usage In the following example we're going to use a minimal and maximum value as well as a decimal precision. {{ pimcore_numeric('myNumber',{ "width" : 300, "minValue" : 0, "maxValue" : 100, "decimalPrecision" : 0 }) }} To display the number also in editmode, you can use the method getData() <p> {{ pimcore_numeric('myNumber').getData() }} </p>
Advanced Usage
[ -0.38517749309539795, -0.7530783414840698, -0.23428316414356232, -0.059811804443597794, 0.3695114552974701, -0.6480350494384766, 0.08856947720050812, -0.050584014505147934, -0.5529491901397705, 0.3965114951133728, -0.15204216539859772, 0.4084850549697876, 0.2229536920785904, 0.194119572639...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Embed#embed-editable
Embed Editable
Embed Editable
[ 0.21453164517879486, -0.6911338567733765, -0.28215277194976807, -0.028860419988632202, 0.27939850091934204, -0.09194484353065491, 0.19916898012161255, 0.13702265918254852, 0.025667713955044746, 0.564234733581543, -0.15805122256278992, 0.2987794876098633, -0.22070404887199402, 0.18939638137...
https://pimcore.com/docs/platform//Pimcore/Documents/Editables/Embed#configuration
Configuration Name Type Description width string Width in the editmode height string Height in the editmode class string A CSS class that is added to the surrounding container of this element in editmode Additionally you can use any configuration option of Embera
Configuration
[ 0.021585751324892044, -0.6646702289581299, -0.2040267288684845, -0.049403853714466095, 0.17548112571239471, 0.18797637522220612, 0.29554271697998047, 0.004855611827224493, -0.2238556444644928, 0.44399622082710266, 0.09341160953044891, -0.03708489239215851, 0.4012438952922821, 0.06652170419...