I am quite new to PHP and I my question is quite simple, but I have not
found any sufficient answer even after spending several hours in google or
reviewing this group.
I am planning a website, which is using an index.php, which has a structure
of the layout.
In this script I am planning to have several include() -statements.
One to generate the site navigation on the left margin.
Another to generate content in the mainarea of the page. The content is
stored in separate html-docs or php.-scripts, which are inserted into
index-page.
Variables, that are needed to pick the right content can be passed in the
url.
I will not use any database, because the content is quite static, but by
using php I am anyway looking for easier maintenance and updating.
My trouble is that I don't know how to generate a navigation that has three
levels, like this:
Item1 in first level ...Item1 in second level
....Item2 in second level
.......Item1 in third level
.......Item2 in third level
.......Item3 in third level
....Item3 in second level
Item2 in first level Item3 in first level Item4 in first level
....and so on....
When user enters the site, only main laevel's links are visible. When user
clicks an item on the first level, the content is updated with the
frontpage of this topic, but at the same time appropriate second level
links are displayed. And so on.
Of course I will use css to make links on different levels distinctive, so
there must be a way to set different class-value in <a> tag in different
levels.
I hope that you didn't fall asleep while reading this. If I failed to give
appropriate information, please ask.
Oll¡maX!