Como criar um novo layout para o eZ Publish 5
por Pedro Resende em 22/11/2012 às 16:44:09
- Entrar dentro do directório base do ezpublish
php ezpublish/console generate:bundle --namespace=<empresa>/<name>Bundle --format=yml
- Entrar dentro de src/
/ Bundle e abrir o ficheiro
<empresa><name>Bundle.php
Substituir por
<?php
namespace <empresa>\<name>Bundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class <empresa><name>Bundle extends Bundle
{
public function getParent()
{
return 'eZDemoBundle';
}
}
- Entrar dentro de src/
/ Bundle/Controller e abrir o ficheiro
DefaultController.php
Substituir por
<?php
namespace <empresa>\<name>Bundle\Controller;
use eZ\DemoBundle\Controller\RegistrationController as BaseController;
class DefaultController extends BaseController
{
}
- Copiar tudo o que está dentro de "/src/EzSystems/DemoBundle/Resources" para dentro do "/src/
/ Bundle/Resources" - Começar alterar os templates dentro da pasta "/src/
/ Bundle/Resources/views" - As imagens, css, javascript e less estão dentro da pasta "/src/
/ Bundle/Resources/public" - Limpar a cache
php ezpublish/console cache:clear --env=prod

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.