Adding a List to the Bottom of a Page
[Note: These instructions are specific to A&S and assume similar index blocks and formats already exist. However, since standard page structure is is the same in all W&M sites this can be applied anywhere.]
For an example of a custom news story listing added to the bottom of a standard content page see http://www.wm.edu/as/psych-sciences
For an example of an events listing added to the bottom of a standard content page see http://www.wm.edu/as/geology
To begin, you need:
- A standard page with an unused "DEFAULT-EXTRA" region. (Confirm this by checking the configuration tab of your page)
- An "index" block
- A format
Steps
1. Create your index block. Note this is unnecessary for event lists. Event lists use the "current page" index block.
a) Under /www.wm.edu/as/_blocks/indexblocks copy a similar Department block and rename it to your department.
b) Edit your new block and change the "Index Folder" field to the folder you wish to pull stories from. Note the folder needs to have the stories in it, the index block does not pull stories out of subfolders.
c) Save.
2. Create your format.
For non-event lists...
a) Under /www.wm.edu/as/_formats copy a similar Department format (use the one that paired with the block that you copied earlier)
b) Edit your new format. In the XML find the <div class="read-more-link"> and change the path of the link inside the div to point to your stories or events listing page (be sure it is in the same format /www.wm.edu/..../index )
c) If you need to show more or less stories find the conditional statements that check for position(). They'll look something like <xsl:if test="position() <= 2"> and you can change the number to whatever you need. Note for 2-column layout formats there will be 2 conditional statements where you need to make the change. For one column layouts there is only one conditional statement of position().
d) Save.
For event lists...
a) Under /www.wm.edu/as/_formats copy a similar Department format (use the one that paired with the block that you copied earlier)
b) Edit your new format. In the XML find the javascript variables rssfeed, rssnum and morelink and change to appropriate values
c) Save.
3. Assign your block and format to the DEFAULT-EXTRA region on your page.
a) Go to your page and edit.
b) On the configuration tab, find the region named DEFAULT-EXTRA
c) Browse to your block to assign it. Browse to your format to assign it.
d) Save.
After saving your page you should see the formatted block under your main content. Be sure to Publish your page! (There is no need to publish the block or format.)