
Hello again!
You know, sometimes, especially with World Wide Web you might become a real psycho, the real mad insanity. That is usually because the webmasters must always think 5 or 10 steps ahead. That is crucial for the CMSs, because you definetly need to think about easy and well organised menus. This is why I am writing this post.
This time I have faced a really simple, but also a very hard-to-solve problem. When you create a website, you are pretty lucky, if you get the one time creation menus with links, for example:
a simple website about a company. So in this case you can have simple menu, like: "about us", "works", "products" and so on...
But lets imagine, that you have a website, with a menu, which needs to be modify very often?
If you have a menu of tutorials, which is often modified (new entries appear), what is the best way to create this menu?
Actually I came up with 4 possible actions:
- you can modify your menu by changing the entire code of your website ( this simply sucks :) );
- to use a content management system ( it is the best sollution, however you have to create it or buy it so lets see the alternatives);
- to create a menu which would get the links from a MYSQL database ( this is quite advanced, but well working. The only problem is that whenever the page loads up, it needs to connect to database, if the connection is broken, the user is left without the menu );
- to create a menu which get the links directly from a XML document ( this is the best ).
- XML document must be placed in the same folder as your website, so actually there is no way the menu won't work. If the website is loaded, the menu is loaded anyways;
- XML works much faster than the connection through PHP to a MySQL database;
- For your menu, you can use the same XML sitemap which you submit to Google or other search engines;
- To modify the menu you onlu need to copy-paste a few lines of code.
In the picture below, you can see the basic strategy how this system works. You can also find information on how to join HTML with XML with JavaScript here. Tutorials about how to create a simple XML document are here.
If you get any problems with this, you can write me. In my opinion this type of menu is the best if the content of it is beeing changed very often.
Thanks for reading, cheers!
No comments:
Post a Comment