Articles to know how use and modify new-website.
|
|
|
| ||||
Articles to know how use and modify new-website.
The user can modify content of data directory. If the modification of files in other directories is needed, you should consider contribute to new-website.
To add a section, create a directory in data directory with a specific format: xx_name_of_section
with xx
an integer to sort section for display. This integer does not appear in the website, nor the url.
Within the section directory add a PHP file named include.php
with the following code:
<?php $section_title = 'Section name'; $section_img = 'section_icon.png'; $section_main = true; // To display section in header menu $section_secondary = false; // To display section in menu ?>' |
Within the section directory add a PHP file named article.php
with the following code:
<article> Type the article of the section using HTML and PHP. </article>' |
The creation of an article and a section is very similar.
To add an article, create a directory in the section directory using the previous format: xx_name_of_section
with xx
.
Within the article directory add a PHP file named include.php
with the following code:
<?php $page_title = 'Article title'; $page_img = 'article_icon.png'; $page_description = 'Article description'; $page_link_in_menu = true; // To display article in menu ?>' |
Within the article directory add a PHP file named article.php
with the following code:
<article> Type the article using HTML and PHP. </article>' |
![]() |
![]() |
![]() |