How do I when to click on the example products link, just change example content and leave header and footer quetos? do with Slin and Rain frameworks, HELP !!!.
How do I when to click on the example products link, just change example content and leave header and footer quetos? do with Slin and Rain frameworks, HELP !!!.
You can use PHP for this:
For example
<section class="section">
<div class="container">
<?php
$url = (isset($_GET['url'])) ? $_GET['url'] : 'login';
$url = array_filter(explode('/', $url));
$file = './pages/' . $url[0] . '.php';
if (is_file($file)) {
require_once $file;
} else {
require_once './pages/404.php';
}
?>
</div>
</section>
Where you will also need a htaccess
:
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA]
What this code basically does is call the file php
within the pages folder indicated in url
: exemplo.com/contatos
without .php
at the end if the page exists it is included if not it returns the page 404.php
You can dynamically load product properties through ajax or use a front-end framework. The easiest way is to load the data dynamically through ajax, since you do not learn a framework overnight, and if you use it badly, you're short on time.