- A "content area" is defined by a small piece of code placed anywhere on an A5W page that brings in content from the database. "Content" can be anything – a news article, a simple list, one or more images, javascript code, Flash, etc. The code that brings in the content looks like this:
<%a5 ?wt_content("mycontent") %>
- In the above example, if a record exists on the Content Area List (i.e., stored in the table named wt_content) with an ID of "mycontent", the code above will place that content on the A5W page.
- But the function wt_content () does more than just display the content. It divides the Content Area in to Title and Body and gives you the ability to define how the content is formatted including height and width, border and background, color, font, as well as CSS such as float and other behavior.
- Formatting for the content area is determined by its CSS Class, selected from a dropdown list of defined classes. The Framework comes with several pre-defined classes named Box1-Box4. You can add new ones or modify existing ones by altering the file at css\theme\default\framework.css.
- For a simple example of content areas, study the page about.a5w in Source View and note CSS is used to divide the page in two columns, and a content area is set in each column using code similar to above. Index.a5w is a more complex page with multiple columns and several content areas.
- You may place a content area anywhere within the <body> tags of any A5W page, just be sure to provide a unique ContentID for the statement…
?wt_content("contentid")
- …and a matching record in the Content Area List.