PHP code example of tdt / pages
1. Go to this page and download the library: Download tdt/pages library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tdt / pages example snippets
use tdt\pages\Generator;
$generator = new Generator();
// Set title
$generator->setTitle("This is an example page");
// Add a javascript library
$generator->addJS("http://....js");
// Add some CSS
$generator->addCSS("http://....css");
// Add a menu item: title, url, active, open in new window
$generator->addMenuItem("This page", "#", true, false);
// Generate the page
$generator->generate("<h1>Hello World!</h1>");