Loading content by a URL alias is done using the URL Alias Service. To get the location and content you will need to do that manually as well. See example below:
$urlAliasService = $this->container->get('ezpublish.api.service.url_alias');
$locationService = $this->container->get('…
Written by Jani Tarvainen on Monday February 18, 2019
Permalink -
eZ Platform stores Rich Text internally in XML. To convert this XML to HTML markup common in web projects, you can use this API:
$xhtml5Converter = $this->container->get('ezpublish.fieldType.ezrichtext.converter.output.xhtml5');
$xml = $view->getContent()->getFieldValue('content')…
Written by Jani Tarvainen on Monday January 21, 2019
Permalink -
It is possible to create or update content in multiple languages at once. There is one restriction: only one language can be set a version's language. This language is the one that will get a flag in the back office. However, you can set values in other languages for your attributes, using the setF…
Written by Jani Tarvainen on Thursday May 24, 2018
Permalink -
eZ Platform EE (Enterprise Edition) contains a field type that stores layout structures with dynamic logic, using specified blocks and layout zones. These are stored as regular content objects within the content repository.
Migrating layout objects can be done using Kaliop Migrations, just like …
Written by Jani Tarvainen on Tuesday January 9, 2018
Permalink -
eZ Platform is a Full Stack Symfony based Content Management System (CMS). It adds a content repository and other features that allow users to create content. This is controlled by a sophisticated permissions system that allows finegrained control.
Developers use standard services to interact wi…
Written by Jani Tarvainen on Thursday July 13, 2017
Permalink -
eZ Platform and eZ Publish 5.4 both use the imagine bundle for scaling images. It can be tricky to work in a local environment without images. One way to work without images is to modify the code to always use a single image.
Some steps to get you on the right path:
Open the file: vendo…
Written by Jani Tarvainen on Wednesday March 22, 2017
Permalink -
In eZ Platform there are plenty of links to go around as you create locations and tree structures. In templates it is well documented how to generate links to locations, but in PHP this is not well documented.
Here is how to do it:
// Load the URL Alias Generator service from the containe…
Written by Jani Tarvainen on Monday December 5, 2016
Permalink -
Facebook sharing uses the Open Graph protocol to markup web documents to contain metadata. Because the eZ Platform is built using the Full Stack Symfony framework, developers can leverage existing Symfony Bundles.
There is an existing Open Graph Bundle for the symfony framework that can be used …
Written by Jani Tarvainen on Wednesday November 9, 2016
Permalink -
eZ Platform is a capable content management system with a flexible and powerful data model. The application already exposes a comprehensive REST API to developers for decoupling using a headless approach to site development.
But as we've all come to know REST APIs vary greatly in their function …
Written by Jani Tarvainen on Tuesday October 11, 2016
Permalink -
eZ Platform ships with a comprehensive REST API. The API has been around for quite a few years and is one of the most robust ones out there. In eZ Platform the UI itself largely utilises the REST API, but it does not do this directly - rather it uses an abstraction layer for this.
This abstracti…
Written by Jani Tarvainen on Sunday September 25, 2016
Permalink -
When creating a new field type in eZ Platform, it's easy to miss that each field type needs to have defined an indexable class. This will lead to errors like this....
Indexing Content...
12/352 [>---------------------------] 3%
[OutOfBounds…
Written by Jani Tarvainen on Tuesday May 24, 2016
Permalink -
Sponsored by Infolox
In eZ Publish you could trust that the templating system will route the rendered menu content to be inserted into the pagelayout.tpl. This allowed developers to always be confortable that their global page elements like menus, search, header and footer will be available.
…
Written by Jani Tarvainen on Wednesday April 6, 2016
Permalink -
eZ Platform is a Content Management System built on a heritage of 15 years of experience and the contemporary Symfony Full Stack PHP framework. Currently there is no supporting infrastructure to help developers find Symfony Bundles to extend functionality.
Developers can search Packagist for eZ …
Written by Jani Tarvainen on Thursday March 31, 2016
Permalink -
eZ Platform has an API exposed to PHP developers through the Symfony service mechanism. The eZ Platform documentation is getting better by the day and there are comprehensive references for the core functionalities like...
eZ Platform Criteria Reference
eZ Platform Limitations Referen…
Written by Jani Tarvainen on Wednesday March 30, 2016
Permalink -
This is a code example from the eZ Publish / eZ Platform API Cookbook on how to search and find Content using the eZ Publish content API in Symfony Controllers or Commands:
<?php
/**
* File containing the FindContent3Command class.
*
* @copyright Copyright (C) eZ Systems AS. All righ…
Written by Jani Tarvainen on Wednesday March 30, 2016
Permalink -
This is a code example from the eZ Publish / eZ Platform API Cookbook on how to search and find Content using the eZ Publish content API in Symfony Controllers or Commands:
<?php
/**
* File containing the FindContent2Command class.
*
* @copyright Copyright (C) eZ Systems AS. All righ…
Written by Jani Tarvainen on Wednesday March 30, 2016
Permalink -
This is a code example from the eZ Publish / eZ Platform API Cookbook on how to search and find Content using the eZ Publish content API in Symfony Controllers or Commands:
<?php
/**
* File containing the FindContentCommand class.
*
* @copyright Copyright (C) eZ Systems AS. All right…
Written by Jani Tarvainen on Wednesday March 30, 2016
Permalink -
This is a code example from the eZ Publish / eZ Platform API Cookbook on how to search and find Content using the eZ Publish content API in Symfony Controllers or Commands:
<?php
/**
* File containing the ViewContentMetaDataCommand class.
*
* @copyright Copyright (C) eZ Systems AS. A…
Written by Jani Tarvainen on Wednesday March 30, 2016
Permalink -
This is a code example from the eZ Publish / eZ Platform API Cookbook on how to search and find Content using the eZ Publish content API in Symfony Controllers or Commands:
<?php
/**
* File containing the ViewContentCommand class.
*
* @copyright Copyright (C) eZ Systems AS. All right…
Written by Jani Tarvainen on Wednesday March 30, 2016
Permalink -
This is a code example from the eZ Publish / eZ Platform API Cookbook on how to search and find Content using the eZ Publish content API in Symfony Controllers or Commands:
<?php
/**
* File containing the CreateContentCommand class.
*
* @copyright Copyright (C) eZ Systems AS. All rig…
Written by Jani Tarvainen on Wednesday March 30, 2016
Permalink -