Como criar um novo layout para o eZ Publish 5

por Pedro Resende em 22/11/2012 às 16:44:09

Ez Logo
  1. Entrar dentro do directório base do ezpublish
php ezpublish/console generate:bundle --namespace=<empresa>/<name>Bundle --format=yml
  1. Entrar dentro de src//Bundle e abrir o ficheiro
<empresa><name>Bundle.php

Substituir por

<?php

namespace &lt;empresa&gt;\&lt;name&gt;Bundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class &lt;empresa&gt;&lt;name&gt;Bundle extends Bundle
{
    public function getParent()
    {
        return 'eZDemoBundle';
    }
}
  1. Entrar dentro de src//Bundle/Controller e abrir o ficheiro

DefaultController.php

Substituir por

<?php

namespace &lt;empresa&gt;\&lt;name&gt;Bundle\Controller;

use eZ\DemoBundle\Controller\RegistrationController as BaseController;

class DefaultController extends BaseController
{

}
  1. Copiar tudo o que está dentro de "/src/EzSystems/DemoBundle/Resources" para dentro do "/src//Bundle/Resources"
  2. Começar alterar os templates dentro da pasta "/src//Bundle/Resources/views"
  3. As imagens, css, javascript e less estão dentro da pasta "/src//Bundle/Resources/public"
  4. Limpar a cache 
php ezpublish/console cache:clear --env=prod
Pedro Resende

Pedro Resende

With over two decades of experience as a Full Stack Developer, I have journeyed through diverse facets of software development. Commencing with the creation of compact institutional websites, I progressed to crafting portals for insurance brokers and contributed to substantial projects for renowned companies such as MS Amlin. My expertise expanded further by delving into product development for Advertiser Kwanko and collaborating with startups in their pivotal ramp-up stages. Notably, I've been involved in architecting extensive e-commerce solutions for global enterprises like Wayfair.

I currently serve as the Tech Lead at Emergn, contributing to the establishment and advancement of the Strategyzer client.