eZ Community » Forums » Developer » Frontpage
expandshrink

Frontpage

Frontpage

Wednesday 17 September 2014 5:19:05 am - 4 replies

Hi ,

in ez publish where should we define the home page.can we create a separate template and   call it as homepage?

 

please can anyone can give me an example?

Wednesday 17 September 2014 7:35:54 am

Hello upeksha,

Your 'HomePage' ask known as the RootNode is located at: http://admin.example.com/content/view/full/2

Yes! You can override the template used for the 'HomePage'.

Simply customize the template override rules used in settings/siteacess/example/override.ini.append.php

[full_frontpage]
Source=node/view/full.tpl
MatchFile=full/frontpage.tpl
Subdir=templates
Match[class_identifier]=frontpage

You can change MatchFIle setting to MatchFile=full/custom_frontpage.tpl for example

By default you don't even have to customize the template override rules in the above example ini settings you can leave them alone and simply create a customized template override.

Simply copy for example the default template override 'extension/ezwebin/design/ezwebin/override/templates/full/frontpage.tpl' to 'extension/customdesignextension/design/ezwebin/override/templates/full/frontpage.tpl'  and edit the template file to meet your own custom needs.

Remember to clear all caches to see your changes! This example assumes you already have a custom design extension to store your custom template overrides within.

I hope this helps! Let us know if you have any more questions.

Cheers,
Heath 

Wednesday 17 September 2014 12:28:09 pm

As a small complement of nformation to the detailed explanation by Heath:

if you want to keep your homepage as node number 2 (it makes sense by default to have the homepage being the top-content-node in the site), but you do not like the content class which it uses, you might find it hard to remove that node and create a new one of a different class.

The tip on how to achieve this is:

1. define the new content class for your homepage, and create a node of this class, somewhere in the content tree

2. click on the context-menu of the root node, in the navigation menu on the left, choose advanced -> swap node, then swap it with the new node

3. delete the old homepage

Thursday 18 September 2014 6:05:55 am

Hi,

Thank you very much Gaeteno and Heath.And can I change the default pagelayout.tpl  to another tpl file I have created?.

Thursday 18 September 2014 10:15:34 pm

Hello upeksha,

Short answer: Yes. Yes you absolutely can using any one of several methods.

The best way to do this is with a design extension template override with no ini settings changes needed.

Cheers,
Heath 

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from