controls the width of the table and matches it to the nav_menu width, and makes it responsive
provides the matching background colour to the nav_menu and the rest of the site.
If there are multiple separate tables then depending on the layout, a new
set may be required around each table.
As noted in new_page.php,
Not every one of the
may be required.
check other pages that are similar to the one you are creating and use that set first.
You can rem them out one at a time and see what affect they have on the new page
If you are adding a language, check a page that most looks like the new page and follow
how it is configured in settings and nav_menu
NOTE that with style/css , a style always over rides one that came before, so sometimes there are repeating declarations in different blocks of a page as an earlier block may have required a specific style.
C. ACCESSING FILES IN ANOTHER FOLDER
If filename.ext is in a subfolder, e.g.
/mxtest/subfolder/filename.ext
then to access a file in subfolder from mxtest, the include should be
- single quotes may be required in some situations but usually it does not matter which is used (provided the pair is the same!).
The ./ means only look in this level
If filename.ext is in a folder at the same level as mxtest, e.g.
.
.
/mxtest/subfolder/filename.ext
/samelevel/filename.ext
.
.
then to access a file in samelevel from mxtest, the include should be
- single quotes may be required in some situations but usually it does not matter which is used (provided the pair is the same!).
the ../ means go up one level
Note that include_once( ) and require_once( ) ensure that the file is loaded once and is accessible to other pages, and if called again in another page it will not be loaded again but the existing loaded file will be used.
If you are not sure which to use, google it, or see below for a shortened version of what is in the link(s) below
https://www.php.net/manual/en/function.include.php
include
(PHP 4, PHP 5, PHP 7)
The include statement includes and evaluates the specified file.
The documentation below also applies to require.
Files are included based on the file path given or, if none is given, the include_path specified. If the file isn't found in the include_path, include will finally check in the calling script's own directory and the current working directory before failing. The include construct will emit an E_WARNING if it cannot find a file; this is different behavior from require, which will emit an E_ERROR.
If a path is defined — whether absolute (starting with a drive letter or \ on Windows, or / on Unix/Linux systems) or relative to the current directory (starting with . or ..) — the include_path will be ignored altogether. For example, if a filename begins with ../, the parser will look in the parent directory to find the requested file.
https://www.php.net/manual/en/function.include-once.php
include_once
(PHP 4, PHP 5, PHP 7)
The include_once statement includes and evaluates the specified file during the execution of the script. This is a behavior similar to the include statement, with the only difference being that if the code from a file has already been included, it will not be included again, and include_once returns TRUE. As the name suggests, the file will be included just once.
include_once may be used in cases where the same file might be included and evaluated more than once during a particular execution of a script, so in this case it may help avoid problems such as function redefinitions, variable value reassignments, etc.
https://www.php.net/manual/en/function.require.php
require ¶
(PHP 4, PHP 5, PHP 7)
require is identical to include except upon failure it will also produce a fatal E_COMPILE_ERROR level error. In other words, it will halt the script whereas include only emits a warning (E_WARNING) which allows the script to continue.
https://www.php.net/manual/en/function.require-once.php
require_once ¶
(PHP 4, PHP 5, PHP 7)
The require_once statement is identical to require except PHP will check if the file has already been included, and if so, not include (require) it again.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DROP DOWN MENU ITEM:-
Adding a drop down menu item to provide a list of additional pages / links.
nav_menu.php contains an example of a drop down menu - Davis Live Consoles
First create a working new page in the site as detailed above.
Test it by opening it directly on the url of your site.
Once you have a working stand alone page, then it can be added to a dropdown menu.
The structure is:-
';} else {echo '
';} ?>
New Pages
The basic structure is an unsorted list
The two lines
';} else {echo '
';} ?>
simply change the status of the menu item seen in the main menu to indicate if it is active or not
AND
initiate the outer list structure.
' or
The next two lines create the drop down mode
and
Name the drop down list for nav_menu.
The and allow this item to be translated. ALL the text inside the lang spans must be added to the relevant langlib xx.json file(s) for each language being supported. Refer to the readme file in the langlib folder to assist with adding translations.
New Pages
Next
establish the form of the unsorted list as "drop down"
Each
>
New Page3.php
creates the menu item in the drop down list.
the final
closes out the outer list structure.
So there is
- .. page1 ..
- .. page2 ..
- .. page3 ..
- .. etc ..
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
D. LINKING TO OTHER WEBSITES
links_singledropdn.html
There is an example of a menu structure in the file links_singledropdn.html which is (included) into the nav_menu.
Here is an example of two ways to add links to another website.
a. The first links directly to another site in the same domain.
b. The third links to a remote site using the full URL
The changes are made in nav_menu.php
Near the end of the file - immediately BEFORE this code at the end of the file,