I have got a static html-template, which I'd like to extend with some
dynamic elements for the:
- menus (navigation)
The code should work with PHP 5.6 and PHP 7.
It also should be based on bootstrap 4 definitions or classes (if
available, e.g. breadcrumbs).
All files should become my own, so that I am allowed to use it on
different projects for my customers.
In order to grant that, the code has to be your own development
and free from rights of third parties.
I would like to have one config-file (no mysql-database) where I can define
the following elements:
- the names of all single menu-elements (navigation bar)
- the status of every single menu-element: activated or not
- the order and the level of every single menu-element
- the title and description meta-tag of every page belonging to each
I don't know how this might work (maybe via the definition of a constant at
the top of every page), but I need a way to tell each single subpage which
page it is, and then add the correct corresponding menu entries, breadcrumbs and meta-tags
from the above mentioned config-file.
> From these entries in that config-file should be created:
1) dynamic BREADCRUMBS which have links to the parent pages and are styled
whith bootstrap: [url removed, login to view]
2) a dynamic SITEMAP on the page "sitemap" with links to every page and
using the classes "sitemap-level-1", "sitemap-level-2" , "sitemap-level-3"
etc. for a hierarchically ordered and css-stylable list.
3) and most importantly, the dynamic MENUS for all the subpages:
I would like to have a menu that is automatically created on every single
page. Here is an example how the menus and especially the product menu
should look like as an end result and why I need the following classes:
[url removed, login to view]
- all necessary bootstrap classes used in the id="produktnavigation":
collapse and navbar-collapse for the div, nav and navbar-nav for the ul
- [url removed, login to view] for highlighting the active product group
- [url removed, login to view]: for the active element -> these links should not contain a
href-element and should not be clickable
- [url removed, login to view]: for the parent menu-element of the active one -> these are
linked and clickable
- a.nav-zwei, a.nav-drei, a.nav-vier (which means translated two, three,
four) for showing the different product levels with an indentation.
Eventually, I have to be able to use this code for 3 differant menus on every single
4) on every page the matching META-TAGS (title and descriptopn) -
defined in the config-file - should be automatically added.