I am kind of uneven how to go about adding help pages to my web project.
The page design is templated. However as I am doing this for myself I got sloppy and didn't do a clear template design on the outputed data. So the text is created on the fly depending on the databse preferences.
Every page gets a hardcoded ID. With this ID I want to create a database driven help system.
All would work fine except one little thing. As my pages are non-static, menus and other items might change and therefore the help page would also require different text.
I could put the help text into the database but how could I add the differnet text options for different e.g. menu settings?
Can I include MySQL Text data into the file and output it? So I could put the switch statement into the database?
Add a help system to a web project
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
there's a potential to use eval() as a means to run stored code.. however, using eval() can be extremely dangerous.. and this is what I don't like about a bunch of templating engines out there.
There may be a way to use table linkage to tell you what help texts to show for a given page. Whereby you have certain ones for the user specific things, and a seperate (internally anyways) hook into the page specific texts. The page specific ones could just be linked to any page ID then, as a generic help among them since a lot of controls are often used in multiple locations.
There may be a way to use table linkage to tell you what help texts to show for a given page. Whereby you have certain ones for the user specific things, and a seperate (internally anyways) hook into the page specific texts. The page specific ones could just be linked to any page ID then, as a generic help among them since a lot of controls are often used in multiple locations.