url stringlengths 50 196 | text stringlengths 3 17.2k | heading stringlengths 2 103 | embeddings list |
|---|---|---|---|
https://pimcore.com/docs/platform//Pimcore/Overview#pimcore-overview | Pimcore Overview
Pimcore is the leading Open Source platform for managing digital data and customer experience. It provides a fully integrated software stack for PIM, MDM, CDP, DAM, DXP/CMS & Digital Commerce.
As a platform, Pimcore provides a solid foundation with generic functionality for all kinds of web applications and therefore
allows rapid application development and building customer solutions really fast.
Its API driven approach makes it easy to develop with Pimcore, allows integration into every IT infrastructure and makes it
easily extendable. Also headless execution of Pimcore is possible.
Pimcore is built for developers and should empower them to build great digital experiences easily. As a consequence, Pimcore
is NOT an ‘out-of-the-box’ software product like Wordpress, Magento, Akeneo, WooCommerce, Shopify and others. You need a developer to get started.
| Pimcore Overview | [
-0.2089182734489441,
-0.23660455644130707,
-0.296866238117218,
0.09270784258842468,
-0.01467122882604599,
-0.2234322726726532,
0.14711475372314453,
-0.14620868861675262,
-0.1970117688179016,
0.13685016334056854,
-0.11400724202394485,
0.33599212765693665,
-0.0171092189848423,
0.473155558109... |
https://pimcore.com/docs/platform//Pimcore/Overview#pimcore-in-a-nutshell | Pimcore in a Nutshell
Our mission is to provide ONE platform for ANY data, ANY channel, ANY process and ANY one. | Pimcore in a Nutshell | [
-0.15525679290294647,
-0.20725277066230774,
-0.2685585916042328,
-0.1104784607887268,
0.10715100169181824,
-0.2752625644207001,
0.11527527123689651,
-0.1626068651676178,
-0.3879677951335907,
0.2965892553329468,
-0.14185641705989838,
0.29043126106262207,
-0.12046079337596893,
0.206931844353... |
https://pimcore.com/docs/platform//Pimcore/Overview#any-data | ANY Data
In Pimcore any digital content can be managed and put in relation with other content.
There are three main element data types in Pimcore: | ANY Data | [
-0.16748036444187164,
-0.17977078258991241,
-0.29201358556747437,
0.27694448828697205,
0.1010701060295105,
0.05805574357509613,
0.2531055510044098,
-0.051173824816942215,
-0.3608877956867218,
0.037005070596933365,
-0.4139538109302521,
0.16406656801700592,
-0.03708815574645996,
0.5340551137... |
https://pimcore.com/docs/platform//Pimcore/Overview#data-objects | Data Objects
Manage any structured data based on a predefined data model, either manually or automatically via the APIs. Define the structure and attributes of your objects by using the class editor. Manage any data – products (PIM/MDM), categories, customers (CDP), orders (digital commerce), blog articles (DXP/CMS). Data Objects provide the possibility to manage structured data for multiple output channels from a single source. By centralizing data in one place, Pimcore's data objects enable you to achieve better data completeness and data quality, allowing you to create and maintain a consistent, up-to-date customer experience across multiple touchpoints in less time. | Data Objects | [
-0.14711984992027283,
-0.04705945774912834,
-0.11163953691720963,
0.22801323235034943,
0.14079050719738007,
-0.03744550049304962,
0.2158900797367096,
-0.2770921289920807,
-0.34460923075675964,
0.11456318199634552,
-0.14741751551628113,
0.30672746896743774,
-0.1526654064655304,
0.5003928542... |
https://pimcore.com/docs/platform//Pimcore/Overview#digital-assets | Digital Assets
Assets are the DAM part of Pimcore. Store, manage and organize digital files such as images, videos, PDFs, Word/Excel documents in a folder structure. Preview 200+ file types directly in Pimcore, edit pictures, and enrich files with additional meta-data. Facial recognition for focal points in images is available. Editors only need to maintain one high-resolution version of a file in the system. Pimcore can automatically generate all required output formats for various channels such as commerce, apps, websites. Of course, including comprehensive user management and version control. | Digital Assets | [
0.0207334216684103,
-0.07671931385993958,
-0.2844465374946594,
-0.11320186406373978,
0.0420357771217823,
0.14040561020374298,
0.2630365192890167,
0.05261345952749252,
-0.20943956077098846,
-0.08480104058980942,
-0.35306814312934875,
0.0716254860162735,
0.0028209914453327656,
0.179624155163... |
https://pimcore.com/docs/platform//Pimcore/Overview#documents | Documents
The DXP/CMS part of Pimcore for managing unstructured content such as the pages of a website and its navigation. Based on Twig templates, documents render physical HTML/CSS pages and provide the capabilities to manage the presentation of data, exactly how customers will experience it. They can be composed by administrators by arranging predefined layout elements. Pimcore documents provide multi-lingual and multi-site capabilities for websites, including emails and newsletters. Total frontend flexibility enables a perfect blend of content and commerce. You can also use them to create content for offline channels, such as printed catalogs (web-to-print).
Most important, all elements (assets, documents or objects) can be linked and set into relation with each other. | Documents | [
-0.13285857439041138,
-0.49086666107177734,
-0.15913796424865723,
0.09726991504430771,
-0.05297543853521347,
0.14859719574451447,
-0.06574395298957825,
0.17571498453617096,
-0.3561921715736389,
-0.015362019650638103,
-0.07719151675701141,
0.24425449967384338,
0.0714714303612709,
0.23466169... |
https://pimcore.com/docs/platform//Pimcore/Overview#any-channel--any-process | ANY Channel / ANY Process
As Pimcore is a platform that stores data independently from the channel, it can provide the managed data to any channel – simple
websites (B2B, B2C), commerce-systems (integrated and/or third party), mobile apps,
print, digital signage, ... there are basically no limits.
In terms of output to the frontend or custom APIs, Pimcore follows the MVC pattern and is based on the Symfony Framework.
If you don't know the MVC pattern yet, please read this article
first.
If you are new to Symfony, you should read the getting started guide of Symfony first. With this
knowledge, learning Pimcore will be much easier.
In addition to that, Pimcore can also be executed in a headless way and therefore integrated into any environment. | ANY Channel / ANY Process | [
-0.1997511237859726,
-0.21327842772006989,
-0.28902897238731384,
-0.050200287252664566,
-0.0029896805062890053,
-0.26583942770957947,
0.19707317650318146,
-0.1378360539674759,
-0.18674170970916748,
-0.15009808540344238,
-0.1529606431722641,
0.347154825925827,
0.06838199496269226,
0.5162231... |
https://pimcore.com/docs/platform//Pimcore/Overview#any-one | ANY One
Pimcore provides lots of functionality on top of its basic data elements that already cover lots of use cases.
But being a platform, Pimcore can be used for pretty much any use case and can be easily extended if necessary. | ANY One | [
-0.30486711859703064,
-0.24932564795017242,
-0.2787485420703888,
0.059966202825307846,
0.036599207669496536,
-0.1673901528120041,
0.3355892300605774,
0.06827675551176071,
-0.15459460020065308,
0.2505371868610382,
-0.045974571257829666,
0.2084161937236786,
-0.10807178169488907,
0.4085633456... |
https://pimcore.com/docs/platform//Pimcore/Overview#pimcore-ecosystem | Pimcore Ecosystem
The following list of resources should show you where to get information about Pimcore and whats going on in the whole ecosystem.
Pimcore Documentation
Pimcore at Github
Pimcore Community Forums
Pimcore at Gitter
Pimcore at Stackoverflow
Pimcore at Packagist
Pimcore Blog
Pimcore Support / Professional Services
| Pimcore Ecosystem | [
0.0030699060298502445,
-0.10255111008882523,
-0.27770060300827026,
0.11995983868837357,
-0.0003763926506508142,
-0.41723549365997314,
0.12058977037668228,
-0.19230139255523682,
-0.49127626419067383,
0.17053528130054474,
-0.06385809928178787,
0.41366782784461975,
0.21815985441207886,
0.2907... |
https://pimcore.com/docs/platform//Pimcore/Overview#contributions | Contributions
As Pimcore is an open-source project, any contributions are highly appreciated. For details, see our Contributing guide.
Wanna see more - Let's get started | Contributions | [
-0.38792330026626587,
-0.016537124291062355,
-0.3445557951927185,
0.0008699120953679085,
-0.19376018643379211,
-0.4282993674278259,
0.09864344447851181,
-0.1225997805595398,
-0.5013834238052368,
0.14182011783123016,
-0.14994964003562927,
0.2805461585521698,
-0.10085143148899078,
0.25579500... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Installation/Docker_Based_Installation#docker-based-installation | Docker-Based Installation
You can use Docker to set up a new Pimcore Installation.
You don't need to have a PHP environment with composer installed. | Docker-Based Installation | [
-0.4915192127227783,
0.0393715463578701,
-0.2790414094924927,
0.052118703722953796,
-0.06627937406301498,
-0.35572028160095215,
0.1603340357542038,
0.06026734411716461,
-0.25606241822242737,
0.3110387921333313,
-0.21437931060791016,
0.3276756703853607,
-0.2670402526855469,
0.18371997773647... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Installation/Docker_Based_Installation#prerequisites | Prerequisites
Your user must be allowed to run docker commands (directly or via sudo).
You must have docker compose installed.
Your user must be allowed to change file permissions (directly or via sudo).
| Prerequisites | [
-0.29464811086654663,
-0.09748821705579758,
-0.18182387948036194,
-0.2293938845396042,
0.013620140962302685,
-0.021603550761938095,
0.3701050281524658,
-0.0061027733609080315,
0.16275854408740997,
0.2864776849746704,
-0.19585508108139038,
-0.020982155576348305,
-0.12832504510879517,
0.0218... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Installation/Docker_Based_Installation#follow-these-steps | Follow These Steps
Choose a Package to Install and create the project via composer
We offer 2 different installation packages:
# demo package with exemplary blueprints (`pimcore/demo`)
docker run -u `id -u`:`id -g` --rm -v `pwd`:/var/www/html pimcore/pimcore:php8.2-latest composer create-project pimcore/demo my-project
# empty skeleton package for experienced developers (`pimcore/skeleton`).
docker run -u `id -u`:`id -g` --rm -v `pwd`:/var/www/html pimcore/pimcore:php8.2-latest composer create-project pimcore/skeleton my-project
Go to your new project
cd my-project/
Part of the new project is a docker compose file
Run echo `id -u`:`id -g` to retrieve your local user and group id
Open the docker-compose.yaml file in an editor, uncomment all the user: '1000:1000' lines and update the ids if necessary
Start the needed services with docker compose up -d
Install pimcore and initialize the DB
docker compose exec php vendor/bin/pimcore-install --mysql-host-socket=db --mysql-username=pimcore --mysql-password=pimcore --mysql-database=pimcore (for demo package the installation can take a while)
:::info
If you choose to install backend search (which is installed by default), you must also adapt the supervisor configuration and add the pimcore_search_backend_message receiver to build up the search index.
:::
:heavy_check_mark: DONE - You can now visit your pimcore instance:
The frontend: http://localhost
The admin interface, using the credentials you have chosen above:
http://localhost/admin
| Follow These Steps | [
-0.339875727891922,
0.24368810653686523,
-0.2784609794616699,
-0.03883346915245056,
-0.08827188611030579,
-0.3446037173271179,
0.158629909157753,
0.14650095999240875,
-0.09806282818317413,
0.4978184103965759,
-0.26494860649108887,
0.34215325117111206,
-0.19129833579063416,
0.05107736587524... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Installation/Docker_Based_Installation#caching | Caching
Make sure to use any sort of caching to improve performance. We recommend Redis cache storage. | Caching | [
-0.27751708030700684,
-0.27161553502082825,
-0.3776962161064148,
-0.010210012085735798,
-0.03775039687752724,
-0.18824319541454315,
0.21829497814178467,
0.2212110012769699,
0.15549473464488983,
0.07671249657869339,
-0.07468420267105103,
-0.033690616488456726,
0.07692766934633255,
0.0242446... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Installation/Docker_Based_Installation#additional-information-&-help | Additional Information & Help
If you would like to know more about the installation process or if you are having problems getting Pimcore up and running, visit the Installation Guide section. | Additional Information & Help | [
-0.2091989666223526,
-0.18193946778774261,
-0.2113000452518463,
0.15000984072685242,
-0.042268190532922745,
-0.07135268300771713,
0.09659476578235626,
-0.38336220383644104,
-0.3186052143573761,
0.10232187062501907,
-0.14021643996238708,
0.2718527913093567,
0.25684595108032227,
0.0768901780... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Installation/Docker_Based_Installation#automating-the-installation-process | Automating the Installation Process
For more information about ways to automate the installation process, have a look on Advanced Installation Topics. | Automating the Installation Process | [
-0.017262831330299377,
-0.1911410540342331,
-0.20908218622207642,
-0.17985641956329346,
0.056099068373441696,
0.1581614464521408,
-0.025024106726050377,
-0.2048572599887848,
0.04924212023615837,
0.16398781538009644,
0.25426822900772095,
0.3566141426563263,
0.16778509318828583,
0.2118099629... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Installation/Webserver_Installation#webserver-installation | Webserver Installation
The following guide assumes you're using a typical LAMP environment. If you're using a different setup (eg. Nginx) or you're facing a problem, please visit the Installation Guide section. | Webserver Installation | [
-0.015380858443677425,
-0.1443416327238083,
-0.2820741534233093,
-0.03547796979546547,
-0.01963573694229126,
-0.07171930372714996,
0.05175885930657387,
-0.21771380305290222,
0.030311260372400284,
-0.05992067605257034,
-0.02754431962966919,
-0.015049628913402557,
0.1110823005437851,
-0.1209... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Installation/Webserver_Installation#1.-system-requirements | 1. System Requirements
Please have a look at System Requirements and ensure your system is ready for Pimcore. | 1. System Requirements | [
-0.3954780101776123,
-0.20061522722244263,
-0.18514326214790344,
0.20082661509513855,
0.20665867626667023,
-0.2046433836221695,
0.025150645524263382,
-0.013811652548611164,
-0.19103679060935974,
0.17747634649276733,
-0.04470782354474068,
0.3545643389225006,
0.18907885253429413,
0.152205809... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Installation/Webserver_Installation#2.-install-pimcore-&-dependencies | 2. Install Pimcore & Dependencies
The easiest way to install Pimcore is from your terminal using Composer.
Change into the root folder of your project:
cd /your/project
:::caution
Please remember: project root != document root
::: | 2. Install Pimcore & Dependencies | [
-0.3582276701927185,
-0.12135189771652222,
-0.2490413635969162,
0.1498595029115677,
-0.022460460662841797,
-0.13453571498394012,
-0.06671534478664398,
0.03285408020019531,
-0.28070440888404846,
0.271901935338974,
0.050054509192705154,
0.4970644414424896,
-0.06486406922340393,
0.15457734465... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Installation/Webserver_Installation#choose-a-package-to-install | Choose a Package to Install
We offer 2 different installation packages:
a demo package with exemplary blueprints.
an empty skeleton package for experienced developers.
| Choose a Package to Install | [
-0.16364982724189758,
-0.2581513524055481,
-0.23108501732349396,
-0.06448405236005783,
-0.28163862228393555,
-0.2151017040014267,
0.33071935176849365,
-0.03168363869190216,
-0.04443354532122612,
0.14296895265579224,
0.16608940064907074,
0.1324133723974228,
-0.015164805576205254,
0.36156377... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Installation/Webserver_Installation#1.-skeleton-package-(only-for-experienced-pimcore-developers) | 1. Skeleton Package (only for experienced Pimcore developers)
COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/skeleton my-project
| 1. Skeleton Package (only for experienced Pimcore developers) | [
-0.3136439919471741,
-0.11957496404647827,
-0.2360747903585434,
0.3068195879459381,
0.010267684236168861,
-0.2732974588871002,
-0.10268649458885193,
0.17829450964927673,
-0.37202906608581543,
0.5403732061386108,
-0.06851238012313843,
0.37316641211509705,
-0.20594006776809692,
0.12084250152... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Installation/Webserver_Installation#demo-package | Demo Package
COMPOSER_MEMORY_LIMIT=-1 composer create-project pimcore/demo my-project
Point the document root of your vhost to the newly created /public folder (eg. /your/project/public).
Keep in mind that Pimcore needs to be installed outside of the document root.
Specific configurations and optimizations for your web server are available here:
Apache,
Nginx
Pimcore requires write access to the following directories (relative to your project root): /var, /public/var (Details)
If you're running the installation using a custom environment name, ensure you already have the right config files in place, e.g. config/packages/[env_name]/config.yaml. | Demo Package | [
-0.4400736689567566,
-0.09804372489452362,
-0.19602453708648682,
0.19347049295902252,
-0.1587064117193222,
-0.3113209307193756,
-0.2897456884384155,
0.20051659643650055,
-0.45385879278182983,
0.38710466027259827,
-0.08236412703990936,
0.10860110074281693,
-0.09646692872047424,
0.0819314196... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Installation/Webserver_Installation#3.-create-database | 3. Create Database
mysql -u root -p -e "CREATE DATABASE project_database charset=utf8mb4;"
For further information please visit out DB Setup Guide | 3. Create Database | [
-0.27755656838417053,
0.15807493031024933,
-0.24307052791118622,
0.24889451265335083,
0.15942522883415222,
0.045488934963941574,
-0.05483792722225189,
0.14982515573501587,
-0.08434273302555084,
0.38030192255973816,
-0.05936663597822189,
-0.12904345989227295,
-0.09776552021503448,
0.1402240... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Installation/Webserver_Installation#4.-launch-installer | 4. Launch Installer
cd ./my-project
./vendor/bin/pimcore-install
This launches the interactive installer with a few questions. Make sure that you set the memory_limit to at least 512M in your php.ini file.
:::info
Pimcore allows a fully automated installation process. Read more here: Advanced Installation Topics
::: | 4. Launch Installer | [
-0.4138645529747009,
-0.20878003537654877,
-0.1994745284318924,
0.2842880189418793,
-0.15316541492938995,
-0.20434758067131042,
-0.23666605353355408,
0.08187796920537949,
-0.34271377325057983,
0.3650513291358948,
0.036626409739255905,
0.2535703778266907,
-0.16843314468860626,
0.15482912957... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Installation/Webserver_Installation#open-admin-interface | Open Admin Interface
After the installer has finished, you can open the admin interface: https://your-host.com/admin | Open Admin Interface | [
-0.4035544693470001,
-0.2730516791343689,
-0.1975504606962204,
-0.05764415115118027,
0.09427373111248016,
-0.1642051786184311,
-0.09885226935148239,
-0.13598912954330444,
0.2967085540294647,
0.25422218441963196,
-0.0917360708117485,
0.06640621274709702,
-0.04708581045269966,
0.145852550864... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Installation/Webserver_Installation#debugging-installation-issues | Debugging Installation Issues
The installer writes a log in var/log which contains any errors encountered during the installation. Please have a look at the logs as a starting point when debugging installation issues. | Debugging Installation Issues | [
-0.19217893481254578,
-0.2641542851924896,
-0.09801826626062393,
0.25489869713783264,
-0.002801920287311077,
-0.08838704228401184,
-0.035263318568468094,
-0.26115912199020386,
0.0863744467496872,
0.12123563140630722,
0.25676798820495605,
0.212137833237648,
-0.02268632873892784,
-0.06493334... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Installation/Webserver_Installation#5.-maintenance-cron-job | 5. Maintenance Cron Job
Maintenance tasks are handled with Symfony Messenger. The pimcore:maintenance command will add the maintenance
messages to the bus and run them afterward immediately from the queue. However, it is recommended to set up independent workers that process the queues by running bin/console messenger:consume pimcore_core pimcore_maintenance pimcore_image_optimize pimcore_asset_update (using e.g.
Supervisor).
# this command needs to be executed via cron or similar task scheduler
# it fills the message queue with the necessary tasks, which are then processed by messenger:consume
*/5 * * * * /your/project/bin/console pimcore:maintenance
# it's recommended to run the following command using a process control system like Supervisor
# please follow the Symfony Messenger guide for a best practice production setup:
# https://symfony.com/doc/current/messenger.html#deploying-to-production
*/5 * * * * /your/project/bin/console messenger:consume pimcore_core pimcore_maintenance pimcore_image_optimize pimcore_search_backend_message --time-limit=300
Depending on installed and activated extensions, it might be necessary to add additional transports to the messenger consume command. Please look at the documentation of corresponding extensions for more details.
Keep in mind that the cron job has to run as the same user as the web interface to avoid permission issues (eg. www-data).
For information about how to handle failed jobs, see this section. | 5. Maintenance Cron Job | [
0.023843050003051758,
0.012764321640133858,
-0.14134570956230164,
-0.08584725856781006,
-0.2853948771953583,
-0.23875243961811066,
0.14745374023914337,
-0.15785984694957733,
0.022211046889424324,
0.12814590334892273,
0.09618443995714188,
0.3780255913734436,
0.09977683424949646,
-0.20201960... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Installation/Webserver_Installation#caching | Caching
Make sure to use any sort of caching to improve performance. We recommend Redis cache storage. | Caching | [
-0.27751708030700684,
-0.27161553502082825,
-0.3776962161064148,
-0.010210012085735798,
-0.03775039687752724,
-0.18824319541454315,
0.21829497814178467,
0.2212110012769699,
0.15549473464488983,
0.07671249657869339,
-0.07468420267105103,
-0.033690616488456726,
0.07692766934633255,
0.0242446... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Installation/Webserver_Installation#6.-additional-information-&-help | 6. Additional Information & Help
If you would like to know more about the installation process or if you are having problems getting Pimcore up and running, visit the Installation Guide section. | 6. Additional Information & Help | [
-0.13671240210533142,
-0.25009822845458984,
-0.21150745451450348,
0.17914944887161255,
-0.0240737646818161,
-0.017745191231369972,
0.08798419684171677,
-0.332658052444458,
-0.1928195059299469,
0.06213175505399704,
-0.1320144236087799,
0.3443208336830139,
0.25414690375328064,
0.037558536976... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Installation/Webserver_Installation#7.-further-reading | 7. Further Reading
Symfony Messenger
Advanced Installation Topics
Apache Configuration
Nginx Configuration
Database Setup
Additional Tools Installation
Next up - Directories Structure | 7. Further Reading | [
0.1864740550518036,
-0.1866501271724701,
-0.19982226192951202,
0.02077553980052471,
0.07103374600410461,
-0.1211736723780632,
0.26281097531318665,
-0.014104911126196384,
0.08751821517944336,
0.025146471336483955,
-0.018840711563825607,
-0.07345515489578247,
0.07565990090370178,
0.069058954... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Advanced_Installation_Topics/Symfony_Messenger#symfony-messenger | Symfony Messenger | Symfony Messenger | [
0.046024471521377563,
-0.25718235969543457,
-0.1827668845653534,
-0.0008893024059943855,
0.06941873580217361,
-0.21585451066493988,
0.29651883244514465,
-0.13406719267368317,
0.0837380439043045,
0.3102784752845764,
-0.08456297218799591,
-0.018971337005496025,
-0.011907938867807388,
-0.1064... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Advanced_Installation_Topics/Symfony_Messenger#handle-failed-jobs | Handle Failed Jobs
If maintenance jobs fail during processing, they are discarded from the respective transport after a defined number of retries.
However, you can move the failed jobs to a new transport (e.g. pimcore_failed_jobs) instead of discarding them completely with following config:
framework:
messenger:
transports:
pimcore_failed_jobs:
dsn: "doctrine://default?queue_name=pimcore_failed_jobs&table_name=messenger_messages_pimcore_failed"
pimcore_core:
dsn: "doctrine://default?queue_name=pimcore_core"
failure_transport: pimcore_failed_jobs
which can be re-processed later after fixing the underlying issue with command bin/console messenger:consume pimcore_failed_jobs.
Please follow the Symfony docs for options on failed jobs processing.
We recommend RabbitMQ as a message queue. For a tutorial, check this link. | Handle Failed Jobs | [
0.0016793784452602267,
0.26603350043296814,
-0.06148376315832138,
0.02320532128214836,
0.04007555544376373,
-0.2444811463356018,
0.2027251422405243,
-0.23257510364055634,
-0.3130105435848236,
0.20955263078212738,
0.20213909447193146,
0.0970691367983818,
-0.24669009447097778,
-0.07589682191... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Advanced_Installation_Topics#advanced-installation-topics | Advanced Installation Topics
To fully automate the installation process, options can be passed in the CLI as parameters, rather than adding them interactively. | Advanced Installation Topics | [
-0.10283041000366211,
-0.4625297784805298,
-0.17635226249694824,
-0.1854095160961151,
-0.009936499409377575,
0.027221722528338432,
0.09759189188480377,
-0.09897078573703766,
0.010256567969918251,
0.27133092284202576,
0.18452292680740356,
0.4073143005371094,
0.11747398227453232,
0.311038434... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Advanced_Installation_Topics#for-docker-installation: | For Docker installation:
docker compose exec php vendor/bin/pimcore-install --admin-username=admin --admin-password=admin \
--mysql-username=username --mysql-password=password --mysql-database=pimcore \
--mysql-host-socket=127.0.0.1 --mysql-port=3306 \
--no-interaction
| For Docker installation: | [
-0.5318301320075989,
0.023731432855129242,
-0.2598867416381836,
-0.15393614768981934,
-0.14112702012062073,
-0.28083306550979614,
-0.030897213146090508,
-0.0038683300372213125,
-0.16821348667144775,
0.35167133808135986,
-0.07395689934492111,
0.44443026185035706,
0.05653128772974014,
-0.003... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Advanced_Installation_Topics#for-webserver-installation: | For webserver installation:
./vendor/bin/pimcore-install --admin-username=admin --admin-password=admin \
--mysql-username=username --mysql-password=password --mysql-database=pimcore \
--mysql-host-socket=127.0.0.1 --mysql-port=3306 \
--no-interaction
:::info
The --no-interaction flag will prevent any interactive prompts.
:::
To avoid having to pass sensitive data (e.g. DB password) as command line option, you can also set each parameter as env
variable. See ./vendor/bin/pimcore-install for details. Example:
$ PIMCORE_INSTALL_MYSQL_USERNAME=username PIMCORE_INSTALL_MYSQL_PASSWORD=password ./vendor/bin/pimcore-install \
--admin-username=admin --admin-password=admin \
--mysql-database=pimcore \
--no-interaction
| For webserver installation: | [
-0.33195245265960693,
-0.0336638018488884,
-0.16624128818511963,
-0.1275120973587036,
-0.08182498812675476,
-0.22332970798015594,
-0.08177632093429565,
-0.11271130293607712,
-0.17026695609092712,
0.2704162299633026,
-0.005504296626895666,
0.47742554545402527,
0.05217995122075081,
-0.056989... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Advanced_Installation_Topics#installing-bundles | Installing Bundles
The --install-bundles flag will install and enable the specified bundles.
Attention: The bundles will be added to config/bundles.php automatically.
./vendor/bin/pimcore-install --admin-username=admin --admin-password=admin \
--mysql-username=username --mysql-password=password --mysql-database=pimcore \
--mysql-host-socket=127.0.0.1 --mysql-port=3306 \
--install-bundles=PimcoreApplicationLoggerBundle,PimcoreCustomReportsBundle \
--no-interaction
Available bundles for installation:
PimcoreApplicationLoggerBundle
PimcoreCustomReportsBundle
PimcoreGlossaryBundle
PimcoreSeoBundle (for SEO-related topics: Robots.txt, Sitemaps and Redirects)
PimcoreSimpleBackendSearchBundle (for default search functionality in Backend UI interface)
PimcoreStaticRoutesBundle
PimcoreTinymceBundle (for default WYSIWYG editor)
PimcoreUuidBundle
PimcoreWordExportBundle (for import/export functionality for translations in Word format)
PimcoreXliffBundle (for import/export functionality for translations in Xliff format)
| Installing Bundles | [
-0.2023138850927353,
-0.056754328310489655,
-0.13650314509868622,
-0.03802988678216934,
-0.2337895929813385,
0.030641425400972366,
-0.04116131365299225,
0.03805426135659218,
-0.348905473947525,
0.10304027795791626,
-0.21161210536956787,
0.5137879252433777,
0.0542881153523922,
0.15697892010... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Advanced_Installation_Topics#adding-or-removing-bundles--bundle-recommendations | Adding or Removing Bundles / Bundle Recommendations
Before bundles are displayed in the installation process, the BundleSetupEvent is fired.
You can listen or subscribe to this event to add/remove bundles.
Note that a recommendation will only be added if the bundle is already in the bundles list.
For more info, you can take a look at the Pimcore Skeleton to see how the Admin UI Classic Bundle is installed.
<?php
namespace App\EventSubscriber;
use Pimcore\Bundle\AdminBundle\PimcoreAdminBundle;
use Pimcore\Bundle\InstallBundle\Event\BundleSetupEvent;
use Pimcore\Bundle\InstallBundle\Event\InstallEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class BundleSetupSubscriber implements EventSubscriberInterface
{
public static function getSubscribedEvents(): array
{
return [
InstallEvents::EVENT_BUNDLE_SETUP => [
['bundleSetup'],
],
];
}
public function bundleSetup(BundleSetupEvent $event): void
{
// add installable bundle and recommend it
$event->addInstallableBundle('PimcoreAdminBundle', PimcoreAdminBundle::class, true);
// add required bundle
$event->addRequiredBundle('PimcoreAdminBundle', PimcoreAdminBundle::class);
}
}
Make sure to register your listener/subscriber under config/installer.yaml as described in Preconfiguring the Installer.
services:
# default configuration for services in *this* file
_defaults:
# automatically injects dependencies in your services
autowire: true
# automatically registers your services as commands, event subscribers, etc.
autoconfigure: true
# this means you cannot fetch services directly from the container via $container->get()
# if you need to do this, you can override this setting on individual services
public: false
# ---------------------------------------------------------
# Event Subscribers
# ---------------------------------------------------------
App\EventSubscriber\BundleSetupSubscriber: ~
| Adding or Removing Bundles / Bundle Recommendations | [
-0.1554616242647171,
-0.11994120478630066,
-0.03556789085268974,
0.008813029155135155,
-0.04945070669054985,
-0.1262996345758438,
-0.1266876757144928,
-0.19518260657787323,
-0.14494745433330536,
0.05125526711344719,
-0.285033643245697,
0.539608359336853,
-0.04496724531054497,
0.04128692671... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Advanced_Installation_Topics#preconfiguring-the-installer | Preconfiguring the Installer
You can preconfigure the values used by the installer by adding a config file which sets values for the database
credentials. This is especially useful when installing Pimcore on platforms where credentials are available via env vars
instead of having direct access to them. To preconfigure the installer, add a config file in config/installer.yaml
(note: the file can be of any format supported by Symfony's config, so you could also use xml or php as the format), then configure the pimcore_install tree:
# config/installer.yaml
pimcore_install:
parameters:
database_credentials:
user: username
password: password
dbname: pimcore
# env variables can be directly read with the %env() syntax
# see https://symfony.com/blog/new-in-symfony-3-2-runtime-environment-variables
host: "%env(DB_HOST)%"
port: "%env(DB_PORT)%"
| Preconfiguring the Installer | [
-0.3758992850780487,
0.12135525792837143,
-0.0622933954000473,
0.10346145927906036,
-0.04588323459029198,
-0.2604481279850006,
0.0511733740568161,
-0.144957035779953,
-0.09991218894720078,
0.3740909993648529,
0.04461827501654625,
0.32944589853286743,
0.08178409188985825,
0.0234351623803377... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Advanced_Installation_Topics#set-a-timezone | Set a Timezone
Make sure to set the corresponding timezone in your configuration.
It will be used for displaying date/time values in the admin backend.
pimcore:
general:
timezone: Europe/Berlin
| Set a Timezone | [
-0.4238136410713196,
-0.06641598790884018,
-0.24840842187404633,
-0.18172390758991241,
0.18177556991577148,
-0.48004990816116333,
0.1765420138835907,
0.01975853741168976,
-0.08439324796199799,
0.3871995806694031,
-0.06676758080720901,
0.3758583068847656,
0.06713466346263885,
0.343052238225... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Advanced_Installation_Topics#office-document-preview | Office document preview
The feature for displaying a preview of documents directly in Pimcore is optional. To use it, you must install either Gotenberg or LibreOffice according to your preference. | Office document preview | [
-0.49953895807266235,
-0.27150288224220276,
-0.11723759025335312,
-0.14095421135425568,
-0.44012993574142456,
0.03736688569188118,
-0.03945004940032959,
0.3390406370162964,
-0.22962549328804016,
0.3290019929409027,
-0.1529596745967865,
0.3514242470264435,
0.14190217852592468,
0.00684392359... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Directory_Structure#directory-structure | Directory Structure
After installing a Pimcore package you should see the folder structure described below.
The following table should give you a quick overview about the purpose of each folder.
In general the directory structure follows the best practice for Symfony projects.
Directory
Description
/bin/
Executable files (e.g. bin/console).
/config/
The application configuration.
/public/
This is the document root (public folder) for your project - point your vhost to this directory!
/src/
The project's PHP code (Services, Controllers, EventListeners, ...)
/templates/
The application templates.
/var/
Private generated files - not accessible via the web (cache, logs, etc.).
/vendor/
All third-party libraries are there. It's the default location for packages installed by Composer / Packagist.
| Directory Structure | [
-0.09554913640022278,
-0.08797205239534378,
-0.14417357742786407,
0.4611380398273468,
-0.0008292027632705867,
-0.19904324412345886,
-0.1371801346540451,
0.04167752340435982,
-0.2750081717967987,
0.11547388136386871,
-0.2673790454864502,
0.28519800305366516,
0.2991202771663666,
-0.095301464... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Directory_Structure#the-public-directory | The public/ Directory
The web root directory is the home of all public and static files like images, stylesheets and
JavaScript files. It is also the place where each front controller (the file that handles all requests
to your application) lives, such as the production controller | The public/ Directory | [
0.08643412590026855,
-0.3304409384727478,
-0.21250921487808228,
0.21485167741775513,
-0.1251002848148346,
0.19524791836738586,
-0.33299121260643005,
0.1887572854757309,
0.06509587168693542,
-0.01342855952680111,
-0.17185278236865997,
-0.31719639897346497,
0.20124554634094238,
-0.4179458618... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Directory_Structure#the-src-directory | The src/ Directory
The Kernel class is the main entry point of the Symfony application configuration and as such,
it is stored in the src/ directory.
For more information about the folder structure and the architecture in general, please have a look at the
Symfony documentation. | The src/ Directory | [
0.15792202949523926,
-0.24344797432422638,
-0.091258704662323,
0.43491730093955994,
0.1390751600265503,
0.05164019763469696,
0.02456413395702839,
-0.10412538796663284,
-0.052316393703222275,
0.1353120505809784,
0.07424912601709366,
-0.014062806963920593,
0.036241315305233,
-0.3383729755878... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Configuration#configuration | Configuration
Pimcore's configuration can be found in several places:
Configurations in var/config/*.(php|yaml) are written from the admin interface. For example the system.yaml file contains the settings from System Settings
The Symfony configuration tree (mainly distributed throughout *.yaml files) contains all Symfony as well as most of the Pimcore related configurations.
A set of PIMCORE_* constants which are used to resolve various filesystem paths
| Configuration | [
-0.16057366132736206,
-0.28967049717903137,
-0.09388468414545059,
0.2301606833934784,
0.08956702798604965,
-0.15788836777210236,
-0.16199180483818054,
-0.14433908462524414,
-0.4129766523838043,
0.13653644919395447,
-0.16376683115959167,
0.1399579793214798,
0.24037623405456543,
-0.010759768... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Configuration#symfony-configuration | Symfony Configuration
Many aspects of Pimcore can be configured through the Symfony Config
tree defined under the pimcore and pimcore_admin extension. These values can be changed through config files in config (e.g. config/config.yaml)).
Pimcore additionally includes a set of standard configuration files which, in contrast to a standard Symfony project, are
not located in config/, but in the PimcoreCoreBundle.
This allows us to ship and update default configurations without affecting project code in config/. See
Auto loading config and routing definitions
for details how this works.
Standard configs will be merged with your custom config in config/ to build the final config tree. You can debug the
values stored in the tree through the following command:
# this is a core Symfony command and works for every bundle, just omit the
# "pimcore" argument to get a list of all bundles
$ bin/console debug:config pimcore
In addition, you can print a reference of valid configuration sections with the following command:
$ bin/console config:dump-reference pimcore
| Symfony Configuration | [
-0.3704862892627716,
-0.19734396040439606,
-0.075396329164505,
0.18414370715618134,
-0.03269132599234581,
-0.2759702205657959,
0.025979381054639816,
-0.06662116199731827,
-0.4213390052318573,
0.272792786359787,
-0.22116965055465698,
0.4487285017967224,
0.07167701423168182,
0.13619305193424... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Configuration#pimcore-constants | Pimcore constants
Pimcore uses several constants for locating certain directories like logging, assets, versions etc. These constants are
defined in lib/Bootstrap.php.
If you need to overwrite these constants (e.g. for using a special directory for assets or versions at an object storage
at AWS S3), you have multiple ways to do so:
Create a file in /config/pimcore/constants.php setting the constants you need. Pimcore will skip setting any constants which are
already defined.
Define an environment variable named after the constant. When defining a constant, Pimcore will look if an env variable
with the same name is defined and use that instead of the default value.
Define an environment variable in a /.env file which will be automatically loaded through the Symfony DotEnv
component if it exists. Environment variables defined here will have the same effect as "real" environment variables. See the Environment-Specific Configurations section for more details.
The Pimcore Skeleton repository contains an example file,
constants.example.php.
The following file is an example of how you can overwrite some paths:
<?php
// to use this file you have to rename it to constants.php
// you can use this file to overwrite the constants defined in lib/Bootstrap.php
define("PIMCORE_CLASS_DIRECTORY", "/my/tmp/path");
Please see lib/Bootstrap.php
for a list of defined constants. | Pimcore constants | [
-0.03751711919903755,
0.0404830239713192,
-0.11449892073869705,
-0.03134012594819069,
0.14105655252933502,
-0.43820396065711975,
0.23997020721435547,
-0.06999201327562332,
-0.34267228841781616,
0.17113201320171356,
-0.01359928771853447,
0.44003206491470337,
0.14700327813625336,
0.253235191... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Configuration#the-pimcore_project_root-constant | The PIMCORE_PROJECT_ROOT constant
There is one special constant PIMCORE_PROJECT_ROOT which is used to resolve the root directory (see Directory Structure)
of the application.
In contrast to the remaining constants, this constant is not defined in constants.php as it is already needed to resolve
the path to the constants.php file. It is defined in Pimcore's bootstrapping class \Pimcore\Bootstrap::setProjectRoot() instead.
You can change the project root through an env variable (or by defining a constant before loading the entry
point) if needed and Pimcore will fall back to its standard value if not defined. If you use Pimcore's standard directory
layout as shipped in the zip file, you don't have to set anything, but if you need some kind of special setup you have full
control over the used paths here.
In contrast to the other constants, PIMCORE_PROJECT_ROOT can not be set via .env Pimcore doesn't know where to look
for a .env file at this point. | The PIMCORE_PROJECT_ROOT constant | [
-0.29871395230293274,
-0.1395566314458847,
-0.09560675919055939,
-0.01204552873969078,
0.27509820461273193,
-0.37664276361465454,
-0.0344056561589241,
-0.1435936540365219,
-0.32725048065185547,
0.26648178696632385,
0.030773043632507324,
0.3698389530181885,
0.17300817370414734,
0.1469361335... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Configuration#adding-logic-to-the-startup-process | Adding logic to the startup process
If you need to execute code to influence Pimcore's startup process, you can do so by adding a file in /config/pimcore/startup.php
which will be automatically included as part of the bootstrap process. Specifically, it will be loaded after all other
bootstrapping (loading the autoloader, parsing constants, ...) is done, but before the kernel is loaded and booted.
This gives you the possibility to reconfigure environment settings before they are used and to configure the system for
your needs. Examples:
Defining the Trusted Proxies configuration on the Request object
Influencing the default environment handling
<?php
// /config/pimcore/startup.php
use \Symfony\Component\HttpFoundation\Request;
Request::setTrustedProxies(['192.0.0.1', '10.0.0.0/8'], Request::HEADER_X_FORWARDED_ALL);
| Adding logic to the startup process | [
-0.3295905888080597,
0.015545225702226162,
-0.16784949600696564,
-0.3054005205631256,
0.15876136720180511,
-0.4655139744281769,
0.07610277831554413,
-0.05504617467522621,
-0.12156890332698822,
0.160568505525589,
0.0009784761350601912,
0.4486119747161865,
0.17662757635116577,
0.268825709819... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Architecture_Overview#architecture-overview | Architecture Overview
At this point we want to give a short overview of the architecture of Pimcore.
As usual, a picture is worth a thousand words:
This chart shows the architecture of a typical Pimcore application. Everything in blue is shipped directly with Pimcore, is an integral part of it, or is an extension of its Core that can be installed depending on the project's needs. The other components are printed in different colors.
Pimcore itself consists of the Pimcore Core and the MVC component.
The Pimcore Core is the main application, which provides all the basic functionalities and can be started within the MVC component or in a headless way, for example via CLI scripts.
The Pimcore Core is also responsible for accessing the persistence layer with Database, Filesystem and Cache-System.
Built upon the Pimcore Core, the MVC component provides all the necessary
functionalities for interacting with Pimcore via the Browser or any other HTTP
API client (REST, SOAP, ...).
The Core extensions can be installed via Composer, extending the Core functionalities with additional functions. Some of them are only provided by the Enterprise Edition.
Plugins and other custom modules/bundles can also be added via Composer and use the Pimcore Core functionalities via its API, or be used by the MVC component.
When implementing solutions with Pimcore, your custom parts should be in one of the following locations within the architecture:
Apps/Website within the MVC component: Here are all the solution specific implementations
like models, views and controllers for your website.
Plugins/Bundles, custom modules: Here are all implementations and modules you might want to reuse
in other projects. Like in other solutions out there, it's not mandatory to make a plugin out of every piece of code.
| Architecture Overview | [
0.00475121708586812,
-0.13347391784191132,
-0.2649163007736206,
0.14026518166065216,
-0.088478222489357,
-0.3433084785938263,
-0.04890937730669975,
-0.1360737681388855,
-0.17611177265644073,
0.05297023802995682,
-0.26934441924095154,
0.4524349570274353,
0.2725147306919098,
0.33648091554641... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Create_a_First_Project#create-a-first-project | Create a First Project
In this section, you will learn the basics of Pimcore, required to start developing. | Create a First Project | [
-0.265362024307251,
-0.19102630019187927,
-0.3228263556957245,
0.014376573264598846,
0.04639919474720955,
-0.30000489950180054,
0.14516876637935638,
-0.17251263558864594,
-0.41828256845474243,
0.47474730014801025,
-0.052700866013765335,
0.06079212203621864,
0.07092434167861938,
0.412170678... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Create_a_First_Project#creating-cms-pages-with-documents | Creating CMS Pages with Documents
In the first part you'll learn the basics for creating CMS pages with Pimcore Documents. | Creating CMS Pages with Documents | [
0.03372952342033386,
-0.19944126904010773,
-0.20109747350215912,
0.006639714818447828,
0.03518116846680641,
-0.17596818506717682,
-0.09679219871759415,
-0.1571887880563736,
-0.5152703523635864,
0.32989931106567383,
-0.00600766995921731,
0.11724497377872467,
0.06460189074277878,
0.263388067... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Create_a_First_Project#create-template,-layout-and-controller | Create Template, Layout and Controller | Create Template, Layout and Controller | [
-0.00001906037869048305,
-0.3855218291282654,
-0.23976477980613708,
-0.007454841863363981,
0.1129770427942276,
-0.18420855700969696,
0.07254337519407272,
0.27129319310188293,
-0.14040495455265045,
0.10881873220205307,
-0.16321168839931488,
0.18772625923156738,
-0.10029912739992142,
0.26880... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Create_a_First_Project#new-controller | New Controller
First of all, we need a controller.
Let's call it ContentController.php.
You have to put the file into the /src/Controller directory.
<?php
namespace App\Controller;
use Pimcore\Controller\FrontendController;
use Symfony\Bridge\Twig\Attribute\Template;
use Symfony\Component\HttpFoundation\Request;
class ContentController extends FrontendController
{
#[Template('content/default.html.twig')]
public function defaultAction(Request $request): array
{
return [];
}
}
For the moment we only have one single action called defaultAction().
In the defaultAction, we can put some custom code or assign values to the template. For this example we
don't need any custom code in our controller, so the action stays empty for the moment. | New Controller | [
-0.14608149230480194,
-0.2789948284626007,
-0.08361532539129257,
-0.18910624086856842,
0.07222798466682434,
-0.2060031145811081,
0.07722435146570206,
0.37126821279525757,
-0.1515629142522812,
0.22467564046382904,
-0.11196868121623993,
0.3858768045902252,
-0.10503397136926651,
0.05522833392... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Create_a_First_Project#create-a-template | Create a Template
Now we create a template for our page:
Create a new folder in /templates and name it like the controller (using the snake_case typo) (in the content case).
Put a new Twig template into this folder and name it like our action (using the snake_case typo) (default.html.twig).
Then we can put some template code into it, for example:
{% extends 'layout.html.twig' %}
{% block content %}
<h1>{{ pimcore_input("headline", {"width": 540}) }}</h1>
{% for i in pimcore_iterate_block(pimcore_block('contentblock')) %}
<h2>{{ pimcore_input('subline') }}</h2>
{{ pimcore_wysiwyg('content') }}
{% endfor %}
{% endblock %}
Pimcore uses by default Symfony Twig engine, so you have the full power of Symfony templates with all Symfony functionalities available. In addition to that, there are some Pimcore specific additions like the so called editables, which add editable parts (placeholders) to the layout and some custom templating helpers.
For details concerning editables (like pimcore_input, pimcore_block, ...) see Editables. | Create a Template | [
0.03821900114417076,
-0.4220135509967804,
-0.14956319332122803,
-0.10941968858242035,
-0.12252797186374664,
-0.2624165713787079,
0.22564975917339325,
0.24756766855716705,
-0.23157189786434174,
0.2063286304473877,
-0.09009469300508499,
0.37957119941711426,
0.03008490800857544,
0.22124505043... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Create_a_First_Project#add-a-layout | Add a Layout
We can use Symfony's template inheritance and layout functionality
to wrap our content page with another template which contains the main navigation, a sidebar, … using the following code:
{% extends 'layout.html.twig' %}
We tell the engine that we want to use the layout layout.html.twig.
Now create a new Twig template in the folder /templates and name it layout.html.twig.
Then we can also put some HTML and template code into it:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example</title>
<style>
body {
padding: 0;
margin: 0;
font-family: "Lucida Sans Unicode", Arial;
font-size: 14px;
}
#site {
margin: 0 auto;
width: 600px;
padding: 30px 0 0 0;
color: #65615E;
}
h1, h2, h3 {
font-size: 18px;
padding: 0 0 5px 0;
border-bottom: 1px solid #001428;
margin-bottom: 5px;
}
h3 {
font-size: 14px;
padding: 15px 0 5px 0;
margin-bottom: 5px;
border-color: #cccccc;
}
img {
border: 0;
}
p {
padding: 0 0 5px 0;
}
a {
color: #000;
}
#logo {
text-align: center;
padding: 50px 0;
}
#logo hr {
display: block;
height: 1px;
overflow: hidden;
background: #BBB;
border: 0;
padding: 0;
margin: 30px 0 20px 0;
}
.claim {
text-transform: uppercase;
color: #BBB;
}
#site ul {
padding: 10px 0 10px 20px;
list-style: circle;
}
.buttons {
margin-bottom: 100px;
text-align: center;
}
.buttons a {
display: inline-block;
background: #6428b4;
color: #fff;
padding: 5px 10px;
margin-right: 10px;
width: 40%;
border-radius: 2px;
text-decoration: none;
}
.buttons a:hover {
background: #1C8BC1;
}
.buttons a:last-child {
margin: 0;
}
</style>
</head>
<body>
<div id="site">
<div id="logo">
<a href="http://www.pimcore.com/"><img src="/bundles/pimcoreadmin/img/logo-claim-gray.svg"
style="width: 400px;"/></a>
<hr/>
</div>
{{ block('content') }}
</div>
</body>
</html>
The code {{ block('content') }} is the placeholder where the content of the page will be inserted. | Add a Layout | [
-0.11757798492908478,
-0.22054293751716614,
-0.21296143531799316,
0.11330737918615341,
0.02711717039346695,
0.031946271657943726,
0.2087474912405014,
0.4009358286857605,
0.014172334223985672,
0.09277274459600449,
-0.16185036301612854,
0.10108352452516556,
0.11856034398078918,
-0.0915838256... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Create_a_First_Project#putting-it-all-together-with-pimcore-documents | Putting It All Together With Pimcore Documents
Now we need to connect the action to a page in the Pimcore backend, so that the page knows which action
(and therefore also which template) needs to be executed/processed.
First, click right on Home in the Documents panel and Select Add Page > Blank to add a new page.
Now select the tab Settings in the newly opened tab.
Select the Controller::Action and template(if different from controller action naming).
You can test the new controller and action, after saving the document (press Save & Publish).
Select the tab Edit, to see your page with all the editable placeholders.
| Putting It All Together With Pimcore Documents | [
-0.18569456040859222,
-0.16366229951381683,
-0.07554749399423599,
-0.1779102087020874,
-0.05085805431008339,
-0.4188951551914215,
0.17272381484508514,
0.24355752766132355,
-0.3600219488143921,
0.0701930895447731,
-0.20359891653060913,
0.526488184928894,
0.04580051451921463,
0.1611626446247... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Create_a_First_Project#introduction-to-assets | Introduction to Assets
In assets, all binary files like images, videos, office files and PDFs, ... can be uploaded, stored and managed.
You can organize them in a directory structure and assign them additional meta data.
Once uploaded, an asset can be used and linked in multiple places - e.g. documents or objects.
In terms of images or videos, always upload only one high quality version (best quality available).
Thumbnails for different output
channels are created directly
within Pimcore using custom configurations.
For this tutorial, at least add one file which you will use in an object later.
There are many ways to upload files:
Drag & drop files from your file explorer into the browser on the desired asset folder
Right click on Home and choose the most suitable method for you
| Introduction to Assets | [
-0.060037869960069656,
-0.12049392610788345,
-0.1520453244447708,
0.03036101907491684,
0.09061913192272186,
-0.10296440124511719,
0.09681343287229538,
0.014953804202377796,
-0.5839118361473083,
0.1595115065574646,
-0.2527521550655365,
0.15302105247974396,
0.08676830679178238,
0.07169013470... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Create_a_First_Project#introduction-to-objects | Introduction to Objects
We've already made a controller, action and a view so we're able to add text from within the admin panel to our pages.
In this chapter we will create a simple product database and use them in our CMS pages.
Objects are used to store any structured data independently from the output-channel and can be used anywhere in your project. | Introduction to Objects | [
0.32520538568496704,
-0.21161909401416779,
-0.1577393114566803,
0.18512502312660217,
0.0960368886590004,
-0.15745636820793152,
0.10733802616596222,
-0.2252618670463562,
-0.1266469955444336,
0.15730582177639008,
0.14930880069732666,
0.08266177028417587,
-0.19698207080364227,
0.5466040372848... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Create_a_First_Project#create-the-class-modeldefinition | Create the Class Model/Definition
Go to: Settings -> Object -> Classes and click the button Add Class.
Now, there is a new product class/model which is a representation of your entity including the underlying database
scheme as well as a generated PHP class you can use to create, update, list and delete your entities.
More specific backgrounds and insights can be found in the Objects section
The product should have the following attributes: SKU, picture, name and description.
Follow these steps to add them:
Go to the edit page of the class product
Click right on Base and select Add Layout Component -> Panel - This is the main panel/container for the following product attributes
To add attributes:
Click right on Panel, then Add data component -> Text -> Input, then change the name of the input component to sku (in the edit panel on the right side)
Just the same way you add the new data field for name
Now we're going to add a WYSIWYG attribute for the description. Again, click right, select Add data component -> Text -> WYSIWYG. We name it description.
The last attribute is for the picture. We can use on of the specialized image components in Other -> Image. Name the attribute picture.
If everything goes well, the new class looks like in the picture:
Important: Every generated class in the Pimcore admin panel has an associated PHP class
with getters and setters. You can find the PHP class representation of our newly created class definition above in
var/classes/DataObject/Product.php | Create the Class Model/Definition | [
-0.013420346193015575,
0.023242147639393806,
-0.09481329470872879,
0.22346793115139008,
0.18614593148231506,
-0.1338992416858673,
0.1512565314769745,
0.0245247520506382,
-0.2975310981273651,
0.03701832517981529,
-0.13951458036899567,
0.33378803730010986,
0.12796594202518463,
0.328352063894... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Create_a_First_Project#add-a-new-object | Add a new Object
We've just prepared a simple class for new products.
Now we can use it to create objects in Pimcore.
Open the objects section on the left and click on the right button after Home (Note that you can also create directory structures for objects).
Choose Add object -> product and fill the input with a name, for example: tshirt
Add values for sku, name and description attributes.
Click Save & Publish
Probably, your view looks like below:
The last step to finish the product object is adding a photo.
One way to upload a photo is using this button: or just drag a file that you uploaded from the Assets section.
Click Save & Publish button.
That's it.
| Add a new Object | [
-0.15264922380447388,
-0.3288746178150177,
-0.0988980233669281,
0.01693023554980755,
-0.03750120475888252,
-0.2219083607196808,
0.14405867457389832,
0.07070522755384445,
-0.2265787571668625,
0.14831264317035675,
-0.041505251079797745,
0.40453875064849854,
-0.0997481569647789,
0.47965446114... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Create_a_First_Project#putting-the-pieces-together | Putting the Pieces Together
Let's put the pieces together and connect the products to the CMS. | Putting the Pieces Together | [
-0.08021553605794907,
-0.15932048857212067,
-0.3117956221103668,
-0.2524526119232178,
0.005940779112279415,
-0.07461409270763397,
0.22892525792121887,
-0.02285815216600895,
-0.4158684015274048,
0.25692617893218994,
0.14560870826244354,
0.007360617630183697,
0.14348286390304565,
0.495589375... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Create_a_First_Project#update-controller-and-template | Update Controller and Template
Therefore create another action in the controller (ContentController) called productAction.
<?php
namespace App\Controller;
use Pimcore\Controller\FrontendController;
use Symfony\Bridge\Twig\Attribute\Template;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class ContentController extends FrontendController
{
#[Template('content/default.html.twig')]
public function defaultAction (Request $request): array
{
return [];
}
public function productAction(Request $request): Response
{
return $this->render('content/product.html.twig');
}
}
Then we also need a new template for our product action: templates/content/product.html.twig
{% extends 'layout.html.twig' %}
{% block content %}
<h1>{{ pimcore_input("headline", {"width": 540}) }}</h1>
<div class="product-info">
{% if editmode %}
{{ pimcore_relation("product") }}
{% else %}
<!-- Product information-->
{% endif %}
</div>
{% endblock %}
{{ editmode }} is a standard variable (it's always set), that checks if the view is called from the Pimcore admin backend and gives you the
possibility to do different stuff in editmode and in the frontend.
{{ pimcore_relation("product") }} is one of the possible editable placeholders. It can be used to make 1 to 1 relations. A cool
alternative for that would be the Renderlet editable.
Click here for a full list of available editables in Pimcore. | Update Controller and Template | [
-0.05562039837241173,
-0.29431673884391785,
-0.1323803961277008,
-0.04154535010457039,
0.07670252025127411,
-0.466871052980423,
0.1641441434621811,
0.2837677001953125,
-0.22859911620616913,
-0.012454886920750141,
-0.277057021856308,
0.48259928822517395,
0.20025034248828888,
0.4105538129806... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Create_a_First_Project#add-the-product-object-to-a-document | Add the Product Object to a Document
The last thing is to show the product in the body of the document you created.
Let's go back to the documents section. Right click on Home then Add Page > Empty Page.
In the settings label, choose the product action and the Content controller, click save and go back to the edit tab.
Now you can see the new editable element (relation) which we added in the product template above.
Drag the product object to that editable and press Save & Publish.
Let's see what happened on the frontend...
Go to the product page. In my case, let's say http://pimcore.local/tshirt where tshirt is the identifier of the product (the name visible the documents tree).
We haven't implemented frontend features yet, therefore the page doesn't contain any product information.
Add a few lines in the template file (templates/content/product.html.twig):
{% extends 'layout.html.twig' %}
{% block content %}
<h1>{{ pimcore_input("headline", {"width": 540}) }}</h1>
<div class="product-info">
{% if editmode %}
{{ pimcore_relation("product") }}
{% else %}
{% set product = pimcore_relation("product").element %}
{% if product %}
<h2>{{ product.name }}</h2>
<div class="content">
{{ product.description|raw }}
</div>
{% endif %}
{% endif %}
</div>
{% endblock %}
You are now able to access the linked object above by using the method getElement().
Now you have access to the entire data from the linked object (name, description, ...). | Add the Product Object to a Document | [
0.1274404376745224,
-0.18409855663776398,
-0.14385920763015747,
0.12044654041528702,
0.008281868882477283,
-0.2634063959121704,
0.1666053831577301,
0.16214339435100555,
-0.3402315080165863,
0.08389692008495331,
-0.21855191886425018,
0.5931207537651062,
0.11694517731666565,
0.38132551312446... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Create_a_First_Project#add-a-thumbnail-configuration | Add a Thumbnail Configuration
To show the product image in the view, we need to add a thumbnail configuration first. Using thumbnail configurations,
Pimcore automatically renders optimized images for certain output channels (including high-res @2x versions).
Adding a thumbnail configuration can be achieved by adding a configuration as depicted below. For now, simply add a configuration named content.
| Add a Thumbnail Configuration | [
-0.3094126284122467,
-0.4707937240600586,
-0.17097575962543488,
-0.05459854006767273,
-0.14559896290302277,
-0.3059960901737213,
0.2622176706790924,
0.06004326045513153,
-0.2107294350862503,
0.18635767698287964,
-0.12397301942110062,
0.6753031015396118,
0.1406203806400299,
0.29980266094207... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started/Create_a_First_Project#showing-the-image-in-the-view | Showing the Image in the View
Last but not least, we would like to show the product picture:
<div class="content">
{% if product.picture %}
{{ product.picture.thumbnail("content").html|raw }}
{% endif %}
{{ product.description|raw }}
</div>
As you can see, Image is an additional class with useful attributes and functions.
To print out the image in the right size just use the method thumbnail.html which returns the <img> or <picture> (when using media queries in your config) tag with the
correct image path and also sets alt attributes to values based on the asset meta data.
Now the product page should look like this:
| Showing the Image in the View | [
0.04171761870384216,
-0.4708133041858673,
-0.22878746688365936,
0.09261414408683777,
-0.018433470278978348,
-0.14890864491462708,
0.06835535168647766,
0.31576672196388245,
-0.053857557475566864,
0.021159587427973747,
0.1290278434753418,
0.3583931624889374,
0.015623739920556545,
0.461027592... |
https://pimcore.com/docs/platform//Pimcore/Getting_Started#getting-started-with-pimcore | Getting Started With Pimcore
This section provides a quick getting started tutorial for Pimcore and covers the following topics:
Installation of Pimcore:
via Docker
via Webserver
Advanced Installation Topics:
Symfony Messenger and How to Handle Failed Jobs
Directory Structure of Pimcore
Configuration
Architecture Overview
Creating your First Project
| Getting Started With Pimcore | [
0.058583978563547134,
-0.011858327314257622,
-0.1649739295244217,
-0.00873121153563261,
-0.009540940634906292,
-0.16547666490077972,
0.3527407944202423,
-0.45432624220848083,
-0.3209466338157654,
0.23191146552562714,
-0.1295263022184372,
0.22184999287128448,
0.2571386694908142,
0.141798079... |
https://pimcore.com/docs/platform//Pimcore/MVC/Controller#pimcore-controller | Pimcore Controller | Pimcore Controller | [
-0.304389089345932,
-0.41285252571105957,
-0.18930301070213318,
0.08102940022945404,
0.057621292769908905,
-0.4203771948814392,
0.1590721607208252,
-0.04868759214878082,
-0.4119980037212372,
0.3084675371646881,
-0.19192595779895782,
0.6164378523826599,
-0.07095465809106827,
0.2815693616867... |
https://pimcore.com/docs/platform//Pimcore/MVC/Controller#introduction | Introduction
Pimcore controllers play the designated role in the MVC pattern. They bind the design patterns together and contain or delegate
the functionality of the application. It is good practise to keep the controllers as lean as possible and encapsulate
the business logic into models or services/libraries.
Pimcore offers an abstract class (Pimcore\Controller\FrontendController), which can be implemented by your controllers.
This abstract class adds some Pimcore specific dispatching features - especially in combination with Pimcore Documents,
multi-language support etc.
The naming of the file and the class is just the same as in Symfony. | Introduction | [
0.040452707558870316,
-0.30523812770843506,
-0.13195312023162842,
-0.033930107951164246,
-0.05556724965572357,
-0.12683017551898956,
0.07198605686426163,
0.02957635000348091,
-0.23656852543354034,
0.08774486929178238,
-0.029211625456809998,
0.3229368329048157,
0.011912849731743336,
0.26530... |
https://pimcore.com/docs/platform//Pimcore/MVC/Controller#pimcore-specialities-and-examples | Pimcore Specialities and Examples
Controller Name
File Name
Class Name
Default View Directory
Content
src/Controller/ContentController.php
App\Controller\ContentController
/templates/content
News
src/Controller/NewsController.php
App\Controller\NewsController
/templates/news
In controllers, for every action there exists a separate method ending with the Action suffix.
The DefaultController comes with Pimcore. When you create an empty page in Pimcore it will call
the defaultAction in the DefaultController which uses the view /templates/default/default.html.twig.
You can render templates just the standard Symfony way, by either using $this->render('foo.html.twig') or using the #Template[] attribute. | Pimcore Specialities and Examples | [
0.013660087250173092,
-0.44081827998161316,
-0.005145938601344824,
-0.0523834154009819,
-0.022224120795726776,
-0.1209883913397789,
0.07377375662326813,
0.18205475807189941,
-0.2595270574092865,
0.24886897206306458,
-0.1296928972005844,
0.32977205514907837,
0.026642993092536926,
0.01942788... |
https://pimcore.com/docs/platform//Pimcore/MVC/Controller#examples | Examples
<?php
namespace App\Controller;
use Pimcore\Controller\FrontendController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Pimcore\Controller\Attribute\ResponseHeader;
class DefaultController extends FrontendController
{
/**
* Very simple example using $this->>render() and passing the parameter 'foo'
*/
public function myAction(): Response
{
return $this->render('content/default.html.twig', ["foo" => "bar"]);
}
/**
* Example using the #[Template] attribute to resolve the view.
* The frontend controller also provides methods to add response headers or via attributes without having
* access to the final response object (as it is automatically created when rendering the view).
*
*/
#[Template('/default/header.html.twig')]
#[ResponseHeader(key: "X-Foo", values: ["123456", "98765"])]
public function headerAction(Request $request): array
{
// schedule a response header via code
$this->addResponseHeader('X-Foo', 'bar', false, $request);
return ["foo" => "bar"];
}
/**
* This action returns a JSON response.
*/
public function jsonAction(Request $request): JsonResponse
{
return $this->json(array('key' => 'value'));
}
/**
* This returns a standard symfony Response object
*/
public function customAction(Request $request): Response
{
return new Response("Just some text");
}
}
| Examples | [
0.01806391403079033,
-0.2473715990781784,
-0.15142495930194855,
0.13040415942668915,
0.1599791944026947,
-0.36118829250335693,
0.09544730186462402,
0.3527562916278839,
0.02983691170811653,
0.26625823974609375,
-0.06799609959125519,
0.3651396632194519,
0.3101627230644226,
-0.143011182546615... |
https://pimcore.com/docs/platform//Pimcore/MVC/Controller#there-are-also-some-properties-which-can-be-useful: | There are also some properties which can be useful:
Name
Type
Description
$this->document
Document
Reference to the current document, if any is available.
$this->editmode
boolean
True if you are in editmode (admin)
| There are also some properties which can be useful: | [
-0.21468782424926758,
-0.17471158504486084,
-0.24578645825386047,
-0.15684980154037476,
-0.1891736090183258,
-0.23406420648097992,
-0.020257163792848587,
0.4002143442630768,
-0.09818033874034882,
0.33664822578430176,
0.06463159620761871,
0.038209062069654465,
-0.18313495814800262,
-0.11507... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Layouts#template-inheritance-and-layouts | Template Inheritance and Layouts | Template Inheritance and Layouts | [
0.09647303819656372,
-0.5674189925193787,
-0.24215345084667206,
0.11146605014801025,
0.2611928880214691,
-0.12071564793586731,
0.40893515944480896,
0.024479132145643234,
-0.1565520167350769,
0.05659455806016922,
-0.21888092160224915,
0.0943431481719017,
-0.003030728083103895,
-0.1094222962... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Layouts#introduction | Introduction
Layouts define everything that repeats on one page to another, such as a header, footer, navigation.
Layouts often contain the basic structure of a HTML document, such as <html>, <head> and the <body>
tag as well as scripts and stylesheets.
In Symfony/Pimcore, this problem is thought about differently: a template can be decorated by another one.
This works exactly the same as PHP classes: template inheritance allows you to build a base "layout"
template that contains all the common elements of your site defined as blocks (think "PHP class with
base methods"). A child template can extend the base layout and override any of its blocks
(think "PHP subclass that overrides certain methods of its parent class").
Layout scripts are just normal view scripts and are located together with normal view scripts in: /templates
For more details about template inheritance and layouts, please have a look at the
Symfony documentation. | Introduction | [
0.0856223776936531,
-0.5604363083839417,
-0.10260176658630371,
0.13436570763587952,
0.08179865777492523,
-0.11448845267295837,
0.26298901438713074,
0.016756901517510414,
-0.024280479177832603,
0.19902066886425018,
-0.18635708093643188,
-0.026846734806895256,
0.312895804643631,
-0.134805649... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Layouts#usage-of-layouts | Usage of Layouts | Usage of Layouts | [
0.17107748985290527,
-0.7974244952201843,
-0.34378287196159363,
0.26486125588417053,
-0.03342235088348389,
-0.019086316227912903,
0.4804396629333496,
-0.22262859344482422,
-0.021775824949145317,
0.19043497741222382,
-0.2969343066215515,
-0.08785179257392883,
0.13127624988555908,
0.02818355... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Layouts#a-simple-sample-layout-looks-like-the-following: | A Simple Sample Layout Looks Like the Following:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example</title>
<link rel="stylesheet" type="text/css" href="/static/css/global.css" />
</head>
<body>
<div id="site">
{{ block('content') }}
</div>
</body>
</html>
Of course, editables and template helpers can be used within the layout file and therefore layouts can become much
more complicated. The most important line though is {{ block('content') }}.
It includes the actual rendered content of the view. | A Simple Sample Layout Looks Like the Following: | [
0.013812190853059292,
-0.4151380658149719,
-0.2303280234336853,
-0.0320977158844471,
-0.03675112873315811,
-0.06305597722530365,
0.2042563557624817,
0.11679355055093765,
0.13279825448989868,
0.017024029046297073,
-0.110924132168293,
0.1591421365737915,
0.05832401290535927,
0.06884666532278... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Layouts#use-a-layout-in-a-template | Use a Layout in a template
Layouts are simply used by declaring a parent template with the following code.
{% extends 'layout.html.twig' %}
In this example we extend from the template layout.html.twig, but we can use any other and as many as needed
scripts instead.
A complete example of a document page would look like the following:
{% extends 'layout.html.twig' %}
...
{% block content %}
<h1>
{{ pimcore_input('headline', {'width': 540}) }}
</h1>
{% endblock %}
| Use a Layout in a template | [
-0.18938438594341278,
-0.6641554832458496,
-0.22697138786315918,
-0.15535102784633636,
0.14530177414417267,
-0.14596682786941528,
0.3067447245121002,
0.13859109580516815,
-0.03991640731692314,
0.34312567114830017,
0.013791323639452457,
0.19029736518859863,
0.24513348937034607,
0.2443989813... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions/Placeholder#placeholder-templating-extension | Placeholder Templating Extension
The Placeholder extension is used to persist content between view scripts and view instances. It also offers
some useful features such as aggregating content, capturing view script content for later use, and adding pre- and
post-text to content (and custom separators for aggregated content). | Placeholder Templating Extension | [
0.062425095587968826,
-0.5109606385231018,
-0.02848762273788452,
-0.20818373560905457,
0.12384204566478729,
-0.0856642797589302,
0.1543956995010376,
0.22234423458576202,
0.4281851351261139,
0.2363254278898239,
0.19164377450942993,
-0.2809774577617645,
0.2139258086681366,
-0.068264432251453... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions/Placeholder#basic-usage | Basic Usage
Basic usage of placeholders is to persist view data. Each invocation of the Placeholder extension expects a
placeholder name. The helper then returns a placeholder container object that you can either manipulate or simply
echo out.
{% do pimcore_placeholder('foo').set("Some text for later") %}
{# outputs "Some text for later" #}
{{ pimcore_placeholder('foo') }}
| Basic Usage | [
-0.07155907154083252,
-0.14773298799991608,
-0.0907522663474083,
-0.15177904069423676,
0.20150920748710632,
-0.3836696743965149,
0.26830264925956726,
0.10699745267629623,
-0.22100874781608582,
0.4322746992111206,
0.3850278854370117,
0.15395711362361908,
0.1581597477197647,
0.09476450085639... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions/Placeholder#aggregate-content | Aggregate Content
Aggregating content via placeholders can be useful at times as well. For instance, your view script may have a variable
array from which you wish to retrieve messages to display later. A later view script can then determine how those will
be rendered.
The Placeholder view helper uses containers that extend ArrayObject, providing a rich feature set for manipulating
arrays. In addition, it offers a variety of methods for formatting the content stored in the container:
setPrefix($prefix) sets text with which to prefix the content. Use getPrefix() at any time to determine what the
current setting is.
setPostfix($postfix) sets text with which to append the content. Use getPostfix() at any time to determine what
the current setting is.
setSeparator($seperator) sets text with which to separate aggregated content. Use getSeparator() at any time to
determine what the current setting is.
setIndent($indent) can be used to set an indentation value for content. If an integer is passed, that number of
spaces will be used. If a string is passed, the string will be used. Use getIndent() at any time to determine what
the current setting is.
{% do pimcore_placeholder('foo').setPrefix("<ul>\n <li>")
.setSeparator("</li><li>\n")
.setIndent(4)
.setPostfix("</li></ul>\n")
%}
{# outputs as unordered list with pretty indentation #}
{{ pimcore_placeholder('foo') }}
| Aggregate Content | [
-0.4831032156944275,
-0.056155726313591,
-0.12138468772172928,
0.029116574674844742,
0.007172125857323408,
-0.26857152581214905,
0.4388004541397095,
0.27080345153808594,
0.15454012155532837,
0.36150795221328735,
0.10644112527370453,
0.04588916897773743,
-0.055045273154973984,
0.18598574399... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions/Placeholder#capture-content | Capture Content
Occasionally you may have content for a placeholder in a view script that is easiest to template. The Placeholder extension allows you to capture arbitrary content for later rendering using the following API.
captureStart($type, $key) begins capturing content.
$type should be one of the Placeholder constants APPEND or SET. If APPEND, captured content is appended to the
list of current content in the placeholder. If SET, captured content is used as the sole value of the placeholder
(potentially replacing any previous content). By default, $type is APPEND.
$key can be used to specify a specific key in the placeholder container to which you want content captured.
captureStart() locks capturing until captureEnd() is called; you cannot nest capturing with the same placeholder
container. Doing so will raise an exception.
captureEnd() stops capturing content, and places it in the container object according to how captureStart() was called.
{# Default capture: append #}
{% do pimcore_placeholder('foo').captureStart() %}
{% for datum in data %}
<div class="foo">
<h2>{{ datum.title }}</h2>
<p>{{ datum.content }}</p>
</div>
{% endfor %}
{% do pimcore_placeholder('foo').captureEnd() %}
{{ pimcore_placeholder('foo') }}
{#Default capture: to key #}
{% do pimcore_placeholder('foo').captureStart('SET', 'data') %}
{% for datum in data %}
<div class="foo">
<h2>{{ datum.title }}</h2>
<p>{{ datum.content }}</p>
</div>
{% endfor %}
{% do pimcore_placeholder('foo').captureEnd() %}
{{ pimcore_placeholder('foo').data | raw }}
| Capture Content | [
-0.2747996151447296,
-0.21364282071590424,
-0.0953262522816658,
-0.09138382971286774,
-0.018353501334786415,
-0.4406128227710724,
0.1625448614358902,
0.4078788161277771,
-0.09088875353336334,
0.11954126507043839,
0.1300060749053955,
0.13912564516067505,
0.11805901676416397,
0.1848537176847... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions/HeadLink#headlink-templating-extension | HeadLink Templating Extension
The HeadLink templating extension extends Placeholder Templating Extension
The HTML <link> element is increasingly used for linking a variety of resources for your site: stylesheets, feeds,
favicons, trackbacks, and more. The HeadLink helper provides a simple interface for creating and aggregating these
elements for later retrieval and output in your layout script.
The HeadLink helper has special methods for adding stylesheet links to its stack:
appendStylesheet($href, $media, $conditionalStylesheet, $extras)
offsetSetStylesheet($index, $href, $media, $conditionalStylesheet, $extras)
prependStylesheet($href, $media, $conditionalStylesheet, $extras)
setStylesheet($href, $media, $conditionalStylesheet, $extras)
The $media value defaults to screen, but may be any valid media value.
$conditionalStylesheet is a string or boolean FALSE, and will be used at rendering time to determine
if special comments should be included to prevent loading of the stylesheet on certain platforms.
$extras is an array of any extra values that you want to be added to the tag.
Additionally, the HeadLink helper has special methods for adding 'alternate' links to its stack:
appendAlternate($href, $type, $title, $extras)
offsetSetAlternate($index, $href, $type, $title, $extras)
prependAlternate($href, $type, $title, $extras)
setAlternate($href, $type, $title, $extras)
The headLink() helper method allows specifying all attributes necessary for a <link> element,
and allows you to also specify placement -- whether the new element replaces all others, prepends (top of stack),
or appends (end of stack). | HeadLink Templating Extension | [
-0.011820845305919647,
-0.5630863308906555,
-0.12707030773162842,
-0.09068611264228821,
0.047576770186424255,
0.08714146912097931,
0.14021962881088257,
0.3312763571739197,
0.4004610776901245,
0.24526043236255646,
-0.050687242299318314,
-0.0186050646007061,
0.20363850891590118,
-0.279983699... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions/HeadLink#basic-usage | Basic Usage
You may specify a headLink at any time.
Typically, you will specify global links in your layout script, and application specific links in your
application view scripts. In your layout script, in the <head> section, you will then echo the helper to output it.
{# setting links in a view script: #}
{% do pimcore_head_link().appendStylesheet('/styles/basic.css') %}
{% do pimcore_head_link({rel: 'icon', href: '/img/favicon.ico'}, 'PREPEND').prependStylesheet('/styles/moz.css', 'screen', true, {id: 'my_stylesheet'}) %}
{# rendering the links: #}
{{ pimcore_head_link() }}
| Basic Usage | [
-0.2987167537212372,
-0.4938603341579437,
-0.1159517914056778,
-0.27739638090133667,
0.16975538432598114,
-0.16613338887691498,
0.38437217473983765,
0.06349682807922363,
0.14057715237140656,
0.2180061936378479,
-0.014894779771566391,
0.41032010316848755,
0.48172393441200256,
-0.08433994650... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions/HeadLink#http2-push-support | HTTP/2 Push Support
The HeadLink and HeadScript helpers have internal support for the WebLink Component.
While you can call $this->webLink()->preload('/path/to/file.css', ['as' => 'style']) directly in your templates, the HeadLink
and HeadScript helpers take care of adding a cache buster aware link instead of the unprefixed file path. Push support is
currently opt-in - to make the helpers automatically include links to the served assets either enable it globally on the
helper level or individually for each item.
{# enable web links for every item #}
{% do pimcore_head_link().enableWebLinks() %}
{# set web link attributes passed to every item #}
{% do pimcore_head_link().setWebLinkAttributes({as: 'style'}) %}
{# enable webLink on an item level #}
{# the item will be added even if enableWebLinks() was not called #}
{% do pimcore_head_link().setWebLinkAttributes({as: 'style'}) %}
{# disable webLink on an item level #}
{# the item won't be added even if enableWebLinks() was called #}
{% do pimcore_head_link().appendStylesheet('/static/css/styles.css', 'screen', false, {webLink: {as: 'style'}}) %}
{# override the used method (default is preload()) #}
{% do pimcore_head_link().appendStylesheet('/static/css/styles.css', 'screen', false, {'webLink': {method: 'prefetch'}}) %}
Added links will be handled by the web link component and injected into the response. Make sure Symfony is properly configured
(this setting is enabled by default from Pimcore's core config):
# config.yaml
framework:
web_links:
enabled: true
| HTTP/2 Push Support | [
-0.37175875902175903,
-0.3623393476009369,
-0.05971083417534828,
-0.1754235327243805,
0.12708941102027893,
-0.17470240592956543,
0.27777668833732605,
0.4087274372577667,
0.15129250288009644,
-0.07368584722280502,
-0.16295425593852997,
0.1763903647661209,
0.06482040137052536,
0.012697889469... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions/HeadMeta#headmeta-templating-extension | HeadMeta Templating Extension
The HeadMeta templating extension extends Placeholder Templating Extension
The HTML <meta> element is used to provide meta information about your HTML document -- typically keywords,
document character set, caching pragmas, etc. Meta tags may be either of the http-equiv or name types,
must contain a content attribute, and can also have either of the lang or scheme modifier attributes.
The HeadMeta helper supports the following methods for setting and adding meta tags:
appendName($keyValue, $content, $conditionalName)
offsetSetName($index, $keyValue, $content, $conditionalName)
prependName($keyValue, $content, $conditionalName)
setName($keyValue, $content, $modifiers)
appendHttpEquiv($keyValue, $content, $conditionalHttpEquiv)
offsetSetHttpEquiv($index, $keyValue, $content, $conditionalHttpEquiv)
prependHttpEquiv($keyValue, $content, $conditionalHttpEquiv)
setHttpEquiv($keyValue, $content, $modifiers)
appendProperty($property, $content, $modifiers)
offsetSetProperty($index, $property, $content, $modifiers)
prependProperty($property, $content, $modifiers)
setProperty($property, $content, $modifiers)
The $keyValue item is used to define a value for the name or http-equiv key; $content is the value for
the content key, and $modifiers is an optional associative array that can contain keys for lang and/or scheme.
You may also set meta tags using the headMeta() helper method, which has the following signature:
headMeta($content, $keyValue, $keyType = 'name', $modifiers = [], $placement = 'APPEND').
$keyValue is the content for the key specified in $keyType, which should be either name or http-equiv.
$placement can be SET (overwrites all previously stored values), APPEND (added to end of stack), or PREPEND (added to top of stack).
HeadMeta overrides each of append(), offsetSet(), prepend(), and set() to enforce usage of the special methods as
listed above. Internally, it stores each item as a stdClass token, which it later serializes using the itemToString()
method. This allows you to perform checks on the items in the stack, and optionally modify these items by simply
modifying the object returned. | HeadMeta Templating Extension | [
0.03296181187033653,
-0.3927188813686371,
-0.12924298644065857,
-0.14889897406101227,
0.16702793538570404,
0.0646003857254982,
0.035667188465595245,
0.2388654351234436,
0.13018850982189178,
0.22874359786510468,
0.0330989845097065,
0.08957719802856445,
0.559004008769989,
-0.1188103184103965... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions/HeadMeta#basic-usage | Basic Usage
You may specify a new meta tag at any time. Typically, you will specify client-side caching rules or SEO keywords.
For instance, if you wish to specify SEO description, you'd be creating a meta name tag with the name
'keywords' and the content the keywords you wish to associate with your page:
{# setting meta description #}
{% do pimcore_head_meta().appendName('description', 'My SEO description for my awesome page') %}
{# setting open graph tags #}
{% do pimcore_head_meta().setProperty('og:title', 'my article title') %}
{% do pimcore_head_meta().setProperty('og:type', 'article') %}
{# setting content type and character set #}
{% do pimcore_head_meta().appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8').appendHttpEquiv('Content-Language', 'en-US') %}
When you're ready to place your meta tags in the layout, simply echo the helper:
{{ pimcore_head_meta() }}
| Basic Usage | [
0.07322824001312256,
-0.47975367307662964,
-0.16460390388965607,
-0.19713011384010315,
0.1294775754213333,
-0.19742663204669952,
-0.0013830324169248343,
-0.17501266300678253,
-0.08220036327838898,
0.215168759226799,
-0.16505447030067444,
0.4490760862827301,
0.30528756976127625,
0.455494850... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions/HeadScript#headscript-templating-extension | HeadScript Templating Extension
The HeadScript templating extension extends Placeholder Templating Extension
The HTML <script> element is used to either provide inline client-side scripting elements or link to a remote resource
containing client-side scripting code. The HeadScript helper allows you to manage both.
The HeadScript helper supports the following methods for setting and adding scripts:
appendFile($src, $type = 'text/javascript', $attrs = [])
offsetSetFile($index, $src, $type = 'text/javascript', $attrs = [])
prependFile($src, $type = 'text/javascript', $attrs = [])
setFile($src, $type = 'text/javascript', $attrs = [])
appendScript($script, $type = 'text/javascript', $attrs = [])
offsetSetScript($index, $script, $type = 'text/javascript', $attrs = [])
prependScript($script, $type = 'text/javascript', $attrs = [])
setScript($script, $type = 'text/javascript', $attrs = [])
In the case of the *File() methods, $src is the remote location of the script to load; this is usually in the form
of a URL or a path. For the *Script() methods, $script is the client-side scripting directives you wish to use in the
element.
Note: Setting Conditional Comments
HeadScript allows you to wrap the script tag in conditional comments, which allows you to hide it from specific browsers.
To add the conditional tags, pass the conditional value as part of the $attrs parameter in the method calls.
| HeadScript Templating Extension | [
0.014355125837028027,
-0.49554839730262756,
-0.1649400293827057,
-0.2597436308860779,
-0.024527210742235184,
-0.03754103183746338,
0.1946592926979065,
0.4998929500579834,
0.5279290676116943,
0.20156525075435638,
0.16282400488853455,
-0.017059847712516785,
0.21815195679664612,
-0.0285365339... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions/HeadScript#example-headscript-with-conditional-comments | Example Headscript With Conditional Comments
{% do pimcore_head_script().appendFile(
'/js/prototype.js',
'text/javascript',
{conditional: 'lt IE 11'}
%}
HeadScript also allows capturing scripts; this can be useful if you want to create the client-side script
programmatically, and then place it elsewhere. The usage for this will be showed in an example below.
Finally, you can also use the headScript() method to quickly add script elements; the signature for this is
headScript($mode = 'FILE', $spec, $placement = 'APPEND'). The $mode is either FILE or SCRIPT, depending on
if you're linking a script or defining one. $spec is either the script file to link or the script source itself.
$placement should be either APPEND, PREPEND, or SET.
HeadScript overrides each of append(), offsetSet(), prepend(), and set() to enforce usage of the special methods as listed above.
Internally, it stores each item as a stdClass token, which it later serializes using the itemToString() method.
This allows you to perform checks on the items in the stack, and optionally modify these items by simply modifying
the object returned.
Note: Use InlineScript for HTML Body Scripts
HeadScript's sibling helper, InlineScript, should be used when you wish to include scripts inline in the HTML body.
Placing scripts at the end of your document is a good practice for speeding up delivery of your page, particularly when using 3rd party analytics scripts.
Note: Arbitrary Attributes are Disabled by Default
By default, HeadScript only will render <script> attributes that are blessed by the W3C.
These include 'type', 'charset', 'defer', 'async', 'language' and 'src'. However, some javascript frameworks,
utilize custom attributes in order to modify behavior.
To allow such attributes, you can enable them via the setAllowArbitraryAttributes() method:
{% do pimcore_head_script().setAllowArbitraryAttributes(true) %} | Example Headscript With Conditional Comments | [
-0.2349100261926651,
-0.3067808151245117,
-0.2232869416475296,
-0.30938300490379333,
0.03314071148633957,
-0.07043533772230148,
0.006075634155422449,
0.4874238669872284,
0.33667245507240295,
0.12141069024801254,
0.06508661806583405,
0.32685160636901855,
0.26049578189849854,
0.2885209321975... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions/HeadScript#basic-usage | Basic Usage
You may specify a new script tag at any time. As noted above, these may be links to outside resource files or scripts themselves.
{# adding scripts #}
{% do pimcore_head_script().appendFile('/js/jquery.js').appendScript(onloadScript) %}
Order is often important with client-side scripting; you may need to ensure that libraries are loaded in a specific
order due to dependencies each have; use the various append, prepend, and offsetSet directives to aid in this task:
{# Putting scripts in order #}
{# place at a particular offset to ensure loaded last #}
{% do pimcore_head_script().offsetSetFile(100, '/js/myfuncs.js') %}
{# append uses next index, 101 #}
{% do pimcore_head_script().appendFile('/js/jquery-plugin-xyz.js') %}
{# but always have base prototype script load first: #}
{% do pimcore_head_script().prependFile('/js/jquery.js') %}
When you're finally ready to output all scripts in your layout script, simply echo the helper:
{{ pimcore_head_script() }} | Basic Usage | [
-0.26343685388565063,
-0.45474109053611755,
-0.1621398776769638,
-0.13025999069213867,
0.14092311263084412,
-0.11692842096090317,
0.27053403854370117,
0.28298619389533997,
0.20669756829738617,
0.25576552748680115,
-0.08817825466394424,
0.4164660573005676,
0.276060551404953,
0.3754596412181... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions/HeadScript#capturing-scripts-using-the-headscript-helper | Capturing Scripts Using the HeadScript Helper
Sometimes you need to generate client-side scripts programmatically. While you could use string concatenation,
heredocs, and the like, often it's easier just to do so by creating the script and sprinkling in Twig tags.
HeadScript lets you do just that, capturing it to the stack:
{% do pimcore_head_script().captureStart() %}
var action = '{{ baseUrl }}';
$('#foo_form').attr("action", action);
{% do pimcore_head_script().captureEnd() %}
The following assumptions are made:
The script will be appended to the stack. If you wish for it to replace the stack or be added to the top,
you will need to pass SET or PREPEND, respectively, as the first argument to captureStart().
The script MIME type is assumed to be text/javascript; if you wish to specify a different type, you will need to
pass it as the second argument to captureStart().
If you wish to specify any additional attributes for the <script> tag, pass them in an array as the third
argument to captureStart(). | Capturing Scripts Using the HeadScript Helper | [
-0.35268738865852356,
-0.310325026512146,
-0.037901055067777634,
-0.08928438276052475,
0.1231800839304924,
-0.31260034441947937,
0.1708301454782486,
0.3002462089061737,
0.032423634082078934,
0.19248512387275696,
0.05122840031981468,
0.30779340863227844,
0.16785503923892975,
0.1907405257225... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions/HeadScript#http2-push-support | HTTP/2 Push Support
See HTTP/2 Push Support on the HeadLink page. | HTTP/2 Push Support | [
-0.27518028020858765,
-0.5273841023445129,
-0.27646854519844055,
-0.2918294370174408,
0.13029760122299194,
-0.1922941505908966,
0.15520302951335907,
0.15007179975509644,
0.06692791730165482,
0.044967200607061386,
-0.02593993954360485,
-0.11158826947212219,
0.002617500489577651,
0.207746252... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions/HeadStyle#headstyle-templating-extension | HeadStyle Templating Extension
The HeadStyle templating extension extends Placeholder Templating Extension
The HTML <style> element is used to include CSS stylesheets inline in the HTML <head> element.
Note: Use HeadLink to link CSS files
HeadLink should be used to create <link> elements for including external stylesheets. HeadStyle is used when you wish to define your stylesheets inline.
The HeadStyle helper supports the following methods for setting and adding stylesheet declarations:
appendStyle($content, $attributes = [])
offsetSetStyle($index, $content, $attributes = [])
prependStyle($content, $attributes = [])
setStyle($content, $attributes = [])
In all cases, $content is the actual CSS declarations. $attributes are any additional attributes you wish to provide
to the style tag: lang, title, media, or dir are all permissible.
Note: Setting Conditional Comments
HeadStyle allows you to wrap the style tag in conditional comments, which allows you to hide it from specific browsers.
To add the conditional tags, pass the conditional value as part of the $attributes parameter in the method calls.
| HeadStyle Templating Extension | [
0.019709141924977303,
-0.6056864857673645,
-0.14702819287776947,
-0.07190637290477753,
0.04467868432402611,
0.22255189716815948,
0.1432313472032547,
0.42547670006752014,
0.38725969195365906,
0.25457486510276794,
-0.08393668383359909,
-0.12436268478631973,
0.3808288276195526,
-0.30152720212... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions/HeadStyle#headstyle-with-conditional-comments | Headstyle With Conditional Comments
{# adding scripts #}
{% do pimcore_head_style().appendStyle(styles, {'conditional': 'lt IE 11'}) %}
HeadStyle also allows capturing style declarations; this can be useful if you want to create the declarations
programmatically, and then place them elsewhere. The usage for this will be showed in an example below.
Finally, you can also use the headStyle() method to quickly add declarations elements; the signature for this is
headStyle($content$placement = 'APPEND', $attributes = []). $placement should be either APPEND, PREPEND , or SET.
HeadStyle overrides each of append(), offsetSet(), prepend(), and set() to enforce usage of the special
methods as listed above. Internally, it stores each item as a stdClass token, which it later serializes using the
itemToString() method. This allows you to perform checks on the items in the stack, and optionally modify these
items by simply modifying the object returned. | Headstyle With Conditional Comments | [
-0.270367830991745,
-0.4337460994720459,
-0.13652794063091278,
-0.11948417872190475,
0.01614176295697689,
-0.1377629190683365,
-0.01671130768954754,
0.4503205120563507,
0.061465490609407425,
0.20436476171016693,
-0.000011637457646429539,
0.39011630415916443,
-0.004363080486655235,
-0.04588... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions/HeadStyle#basic-usage | Basic Usage
You may specify a new style tag at any time:
{# adding styles #}
{% do pimcore_head_style().appendStyle(styles) %}
Order is very important with CSS; you may need to ensure that declarations are loaded in a specific order due to the
order of the cascade; use the various append, prepend, and offsetSet directives to aid in this task:
{# Putting styles in order #}
{# place at a particular offset: #}
{% do pimcore_head_style().offsetSetStyle(100, customStyles) %}
{# place at end: #}
{% do pimcore_head_style().appendStyle(finalStyles) %}
{# place at beginning #}
{% do pimcore_head_style().prependStyle(firstStyles) %}
When you're finally ready to output all style declarations in your layout script, simply echo the helper:
{{ pimcore_head_style() }}
| Basic Usage | [
-0.3809485137462616,
-0.5190005302429199,
-0.17114871740341187,
-0.1747344583272934,
0.1804882287979126,
-0.13171657919883728,
0.23161961138248444,
0.25667816400527954,
-0.05445576086640358,
0.3365780711174011,
0.024593312293291092,
0.312584787607193,
0.09214462339878082,
0.152336969971656... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions/HeadStyle#capturing-style-declarations | Capturing Style Declarations
Sometimes you need to generate CSS style declarations programmatically. While you could use string concatenation,
heredocs, and the like, often it's easier just to do so by creating the styles and sprinkling in Twig tags.
HeadStyle lets you do just that, capturing it to the stack:
{% do pimcore_head_style().captureStart() %}
body {
background-color: red
}
{% do pimcore_head_style().captureEnd() %}
The following assumptions are made:
The style declarations will be appended to the stack. If you wish for them to replace the stack or be added to the top,
you will need to pass SET or PREPEND, respectively, as the first argument to captureStart().
If you wish to specify any additional attributes for the <style> tag, pass them in an array as the second argument to
captureStart(). | Capturing Style Declarations | [
-0.3700714409351349,
-0.43167734146118164,
0.029517430812120438,
-0.03149453550577164,
0.1789303719997406,
-0.2252570241689682,
0.08448667824268341,
0.255583792924881,
-0.3933420777320862,
0.24419032037258148,
-0.19473709166049957,
0.4527473449707031,
0.2428388148546219,
-0.13050477206707,... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions/HeadTitle#headtitle-templating-extension | HeadTitle Templating Extension
The HeadTitle templating extension extends Placeholder Templating Extension
The HTML <title> element is used to provide a title for an HTML document.
The HeadTitle helper allows you to programmatically create and store the title for later retrieval and output. | HeadTitle Templating Extension | [
0.182752788066864,
-0.3492349684238434,
-0.11189323663711548,
-0.04515187069773674,
0.049704767763614655,
0.3374190628528595,
0.11788095533847809,
0.25160107016563416,
0.35149410367012024,
0.37037909030914307,
0.11732195317745209,
-0.26533597707748413,
0.33760663866996765,
-0.2213443070650... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions/HeadTitle#basic-usage | Basic Usage
You may specify a title tag at any time.
A typical usage would have you setting title segments for each level of depth in your application: site,
controller, action, and potentially resource.
{% do pimcore_head_title('My first part') %}
{% do pimcore_head_title('The 2nd part') %}
{# setting the site in the title; possibly in the layout script: #}
{% do pimcore_head_title('My Pimcore Website') %}
{# setting a separator string for segments: #}
{% do pimcore_head_title().setSeparator(' / ') %}
When you're finally ready to render the title in your layout script, simply echo the helper:
{{ pimcore_head_title() }}
{# renders My first part / The 2nd part / My Pimcore Website #}
| Basic Usage | [
-0.07033345103263855,
-0.3004257380962372,
-0.16055041551589966,
-0.03200756385922432,
0.22176702320575714,
-0.1763637512922287,
0.29078173637390137,
0.042759403586387634,
-0.010057280771434307,
0.47833138704299927,
-0.022456835955381393,
0.32004785537719727,
0.29385197162628174,
0.1973583... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions/InlineScript#inlinescript-template-extension | InlineScript Template Extension
The InlineScript template extension extends Placeholder Templating Extension
The HTML <script> element is used to either provide inline client-side scripting elements or link to a remote resource
containing client-side scripting code. The InlineScript helper allows you to manage both. It is derived from HeadScript,
and any method of that extension is available; however, use the pimcore_inline_script() method in place of pimcore_head_script().
Note: pimcore_inline_script() should be used when you wish to include scripts inline in the HTML body. Placing scripts at the end of
your document is a good practice for speeding up delivery of your page, particularly when using 3rd party analytics scripts.
Some JS libraries need to be included in the HTML head; use pimcore_head_script() for those scripts.
| InlineScript Template Extension | [
-0.19432367384433746,
-0.6052746772766113,
-0.21475689113140106,
-0.40422335267066956,
0.09446009993553162,
0.07926683872938156,
0.17704002559185028,
0.3295139670372009,
0.2693586051464081,
0.2520589530467987,
0.2219507098197937,
0.17295511066913605,
0.3874647915363312,
0.25896549224853516... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions#twig-extensions | Twig Extensions | Twig Extensions | [
0.231991246342659,
-0.6881396174430847,
-0.25755682587623596,
0.23253966867923737,
0.19172720611095428,
-0.10515990853309631,
0.3341968059539795,
-0.007949870079755783,
-0.11434599757194519,
0.30164504051208496,
0.000011240014828217681,
0.262893408536911,
-0.1754271388053894,
-0.1812824308... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions#introduction | Introduction
Twig Extensions are functions, filters and more that offer special functionality to increase usability of view scripts.
Following an overview of some Twig Extensions:
render
render_esi
controller
asset
csrf_token
path
absolute_url
translator
trans
url
relative_path
In addition to the standard Twig extensions, Pimcore adds some additional powerful extensions. | Introduction | [
0.010356745682656765,
-0.44320032000541687,
-0.1586652249097824,
-0.08952312171459198,
0.01861453987658024,
-0.06689868867397308,
0.05399183928966522,
0.19243882596492767,
-0.10915219038724899,
0.011525441892445087,
-0.14450499415397644,
0.5563650131225586,
-0.0023081789258867502,
-0.13975... |
https://pimcore.com/docs/platform//Pimcore/MVC/Template/Template_Extensions#pimcore-twig-extensions | Pimcore Twig Extensions
All Twig extension functions are described below in detail, the following tables give just a short overview of all available extensions.
Extension
Description
pimcore_cache()
Simple in-template caching functionality
pimcore_device()
Helps implementing adaptive designs
pimcore_glossary
Twig Filter: Apply filter on content to pass it to Glossary engine
pimcore_placeholder()
Adding and embedding custom placeholders, e.g. for special header tags, etc.
pimcore_head_link()
Embeding / managing referenced stylesheets (alternative to assets())
pimcore_head_meta()
Managing your <meta> elements in your HTML document
pimcore_head_script()
Managing your <scripts> elements
pimcore_head_style()
Managing inline styles (pendant to headLink() for inline styles)
pimcore_head_title()
Create and store the HTML document's <title> for later retrieval and output
pimcore_inc()
Use this function to directly include a Pimcore document
pimcore_inline_script
Managing inline scripts (pendant to headScript() for inline scripts)
pimcore_build_nav(), pimcore_render_nav(), pimcore_nav_renderer()
Embed and build navigations based on the document structure
pimcore_url()
An alternative to url() and path()
pimcore_website_config()
Fetch website settings or specific setting (first param: key) for the current site
pimcore_image_thumbnail()
Returns a path to a given thumbnail on image
pimcore_image_thumbnail_html()
Returns html for displaying the thumbnail image
pimcore_supported_locales()
Use this function to get a list of supported locales
Pimcore also adds some Twig tests for evaluating boolean conditions e.g.
{# using 'instaceof' checks if object is instanceof provided classname #}
{% if (product is instanceof('App\\Model\\Product\\Car')) %}
...
{% endif %}
{# using 'pimcore_data_object' checks if object is instanceof \Pimcore\Model\DataObject\Concrete #}
{% if (product is pimcore_data_object) %}
...
{% endif %}
The following table gives an overview of all available tests:
Test
Description
instanceof(classname)
Checks if an object is an instance of a given class
pimcore_asset
Checks if object is instanceof Asset
pimcore_asset_archive
Checks if object is instanceof Asset\Archive
pimcore_asset_audio
Checks if object is instanceof Asset\Audio
pimcore_asset_document
Checks if object is instanceof Asset\Document
pimcore_asset_folder
Checks if object is instanceof Asset\Folder
pimcore_asset_image
Checks if object is instanceof Asset\Image
pimcore_asset_text
Checks if object is instanceof Asset\Text
pimcore_asset_unknown
Checks if object is instanceof Asset\Unknown
pimcore_asset_video
Checks if object is instanceof Asset\Video
pimcore_data_object
Checks if object is instanceof DataObject\Concrete
pimcore_data_object_folder
Checks if object is instanceof DataObject\Folder
pimcore_data_object_class(classname)
Checks if object is instanceof Pimcore\Model\DataObject{Classname}
pimcore_data_object_gallery
Checks if object is instanceof DataObject\Data\ImageGallery
pimcore_data_object_hotspot_image
Checks if object is instanceof DataObject\Data\Hotspotimage
pimcore_document
Checks if object is instanceof Document
pimcore_document_email
Checks if object is instanceof Document\Email
pimcore_document_folder
Checks if object is instanceof Document\Folder
pimcore_document_hardlink
Checks if object is instanceof Document\Hardlink
pimcore_document_page
Checks if object is instanceof Document\Page
pimcore_document_link
Checks if object is instanceof Document\Link
pimcore_document_page_snippet
Checks if object is instanceof Document\PageSnippet
pimcore_document_snippet
Checks if object is instanceof Document\Snippet
The following tests are only available if the PimcoreWebToPrintBundle is enabled and installed:
Test
Description
pimcore_document_print
Checks if object is instanceof PrintAbstract
pimcore_document_print_container
Checks if object is instanceof Printcontainer
pimcore_document_print_page
Checks if object is instanceof Printpage
The following tests are only available if the PimcoreNewsletterBundle is enabled and installed:
Test
Description
pimcore_document_newsletter
Checks if object is instanceof Newsletter
You can also create your own custom Twig Extension to make certain functionalities available to your views.
Here you can find an example how to create
your own Twig Extension. | Pimcore Twig Extensions | [
-0.027681119740009308,
-0.5051795840263367,
-0.188625767827034,
0.16094167530536652,
-0.023452766239643097,
0.07018804550170898,
0.00046664607361890376,
0.19046102464199066,
-0.26286035776138306,
0.06568969041109085,
-0.3097626268863678,
0.6379942893981934,
0.10028617829084396,
0.040703691... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.