How Should Fragments Be Used? Will Primary and Secondary Pages Require Different Templates?

Efficient Web Site Planning 4-11 can edit the data displayed through the placeholder, whether the contributor can edit the metadata, ability to view Web site usage reports, and the ability to view content tracker reports.

4.10 Creating Page Templates

A large number of Web sites can be reduced to two simple page templates: the home page, and then all other pages. It is not uncommon for a Web site to have a home page that is distinct in terms of layout and design compared to the other pages in the Web site. It may be the case that there are multiple templates for your site. It is also possible to make an entire Web site work with one page template. If you do design the Web site with several page templates, you should possibly consider the use of subtemplates to reduce the number of page templates. Fewer page templates on a Web site makes site-wide changes much easier. You should ask yourself the following questions as you plan page templates: ■ How Should Fragments Be Used? on page 4-11 ■ Will Primary and Secondary Pages Require Different Templates? on page 4-11 4.10.1 How Should Fragments Be Used? Fragments are especially useful for maintaining dynamic content or content built with a custom script. Fragments could also be used for content that you would like to manage separately from the site assets and the contributor data files. This might be as simple as a copyright statement or as complex as a JavaScript menu. The number of fragments and the complexity of those fragments varies, depending on your site. For more information on fragments, see Chapter 13, Working With Fragments. 4.10.2 Will Primary and Secondary Pages Require Different Templates? Primary and secondary pages can both use the same page templates. However, since secondary pages are the only pages that can have dynamically placed content, you should consider the effect on how you view your page templates and even your placeholders and placeholder definitions with respect to the advantages of dynamically placed content. A secondary page serves as the backdrop for content added to the site by a contributor. Secondary pages are required if you allow contributors to add contributor data files or native documents both of which amount to new web pages to the Web site. These files are made available to the site when they are picked up by a dynamic list, a search, or the target of a link. It may be that you first build your site with just primary pages, saving secondary pages until after you set up contribution regions on the primary pages and know exactly what type of content contributors submit to the site. Then, you could add the secondary pages to handle this content. Regardless of whether you use the same or different page templates for the primary and secondary pages in your Web site, it is important that you name the page templates appropriately. This is the same for all other site assets in Site Studio. Consider the example shown in Figure 4–4 : 4-12 Oracle Fusion Middleware Users Guide for Site Studio Designer Figure 4–4 Hierarchy Showing a Poorly Named Template The same page template was used for both the primary and secondary pages. The page template name was based on where the template was based on initial placement, and when the site was expanded the reuse of the page template created a confusing arrangement. The most efficient naming of site assets, including page templates, should be based on how the page template is used. Naming conventions based on where the asset is used in a Web site for instance, page_template_primarypage or based on in the order of creation for instance pagetemplate3 can make the assets harder to manage.

4.11 Planning the Site Hierarchy