How to make the homepage of a website using CakePHP 3.0

4

How should a site's home page be made using the CakePHP 3.0 Framework (3.0.3)? This page has dynamic content.

What this page consists of: It is a display page for key products and product categories (both searched by the bank), and it will display different page components (buttons and menus) if the user is logged in or not. This page should be accessible without any parameter passing via URL ( http://localhost:8765/ )

What I tried to do:

I have edited the template Template/Pages/home.ctp of the PagesController (both generated by the bake ), in the documentation it is said that PagesController is optional and for static pages (and is displayed when the% / p>

What should be done to create a homepage without this dynamic page being bound to a http://localhost:8765/ that is bound to an entity and table?

    
asked by anonymous 23.07.2015 / 19:20

1 answer

3

You can use Elements .

I do not see any problem with your PagesController accessing data from multiple entities to mount the View . Just make sure that you're targeting each element of the homepage to make it easier to maintain in the future, since the home page is the one that most changes during the life cycle of a web application.

    
23.07.2015 / 19:23