Skip to content

generatePage()

Luca Crippa edited this page Dec 11, 2018 · 3 revisions

This function can be called to fill the html structure with the selected page from the DB. It requires:

  • The URL of the page, created and released during page creation and available in admin zone page list
  • The index of the divs to be updated

You can call this function more times into a single page, to create a more complex html structure. For example, you will need to call:

generatePage("url-of-page", 0);

generatePage("url-of-other-page", 1);

in the same php page in order to fill divs named:

put-title-here0

put-text-here0

put-title-here1

put-text-here1

Etc, following the convention declared here: https://github.com/lucacrippa88/build-modular-website/wiki/Conventions.

Clone this wiki locally