How to make a website homepage using Cakephp 3.0

Asked

Viewed 397 times

4

How should a website homepage be done using the Cakephp 3.0 (3.0.3) Framework? This page has dynamic content.

What this page consists of: It is a display page of major products and product categories (both searched from the bank), and 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 edited the template Template/Pages/home.ctp of PagesController (both generated by bake), in the documentation it is said that PagesController is optional and for static pages (and is displayed when accessed the address http://localhost:8765/).

What should be done to create a home page without this dynamic page being linked to a controller which must be linked to an entity and table?

1 answer

3


You can use Elements.

I see no problem in your PagesController make access to data of various entities to assemble the View. Just make sure you target each element of the homepage to facilitate maintenance in the future, as the homepage changes the most during the lifecycle of a web application.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.