MASIGNCLEAN101

Code In A Content Management System

If you are working with a content management system, blogging platform, or e-commerce application, you will probably log into a special administration section of the website to control it. The tools provided in the administration sections of these sites usually allow you to edit parts of the page rather than the entire page, which means you will rarely see the <html>, <head>, or <body> elements.
If you are working with a content management system Code in a Content Management System
Code in a Content Management System

Looking at the content management system on the opposite page, you have a box that allows you to enter a title for the page, another box for the main article, a way to enter a publication date, and something to indicate which section of the site this page belongs in.



For an e-commerce store, you might have boxes that allow you to enter a title for the product, a description of the product, its price, and the quantity available.



That is because they use a single 'template' to control all of the pages for a section of the site. (For example, an e-commerce system might use the same template to show all of their
products.) The information you supply is placed into the templates.

The advantage of this approach is that people who do not know how to write web pages can

add information to a website and it is also possible to change the presentation of something in the template, and it will automatically update every page that uses that template. If you imagine an e-commerce store with 1,000 items for sale, just altering one template is a lot easier than changing the page for each individual product. In systems like this, when you have a large block of text that you can edit, such as a news article, blog entry or the description of a product in an e-commerce store, you will often see a text editor displayed.

Text editors usually have controls a little like those on your word processor, giving you different options to style text, add links or insert images. Behind the scenes these editors

are adding HTML code to your text, just like the code you have seen earlier in this chapter.
Many of these editors will have an option that allows you to see (and edit) the code that they produce.


Once you know how to read and edit this code, you can take more control over these sections of your website.

In the example above, you can see that the text editor has a tab for Visual / HTML views of what the user enters. Other systems might have a button (which often shows angle brackets) to indicate how to access the code.


Some content management systems offer tools that also allow you to edit the template

files. If you do try to edit template files you need to check the documentation for your CMS
as they all differ from each other. You need to be careful when editing template files because if you delete the wrong piece of code or add something in the wrong place the site may stop working entirely.
Share This :
Sarah

Followers