Tips & Tricks: Using the New Organize Features - Part 2


Friday, November 7, 2008  

A little while back we announced a new release that adds an Organize tab to the editing screen. The Organize tab and corresponding Include Scripts are kind of like Legos. You can assemble them in lots of different ways to create lots of different results. This is part two of a two-part post to provide step-by-step instructions for some neat things you can do with these new features, particularly focused on using the new Page Date field.

Read part one if you haven't yet, as this post builds upon that information.

About the Page Date Field

The Properties tab of the editing screen has a Page Date field that allows a fixed calendar date to be associated with a page. The Page Date can be used for a few different purposes:

  • Create pages with a fixed date, such as a blog post or press release
  • Provide an alternate and editable sorting mechanism for pages
  • Capture and display the creation date of pages

Page Date is optional - pages created on your site before this release do not have a page date value. Pages created since the release default to the creation date of the page. To remove the page date value, click the Clear button next to the field and then Save Changes. The new date-based navigation tools will automatically exclude any page that does not have a page date value, so you may want to only use the page date for certain types of pages on your site that should be navigated by date.

Listing Pages by Date

Once you have some pages with Page Date values on your site, you can use the _PagesByDate include script to list them. _PagesByDate has several different options that you can use to control its output.

By default, _PagesByDate will list all visible pages on your site that have a page date value. They'll be listed with a linked title, the page date, and grouped by month. For example:

[[include:_PagesByDate]]

You can use the year and/or month arguments to list pages with a specified year or month. The example below will list pages with a page date between the 1st and 31st of August, 2008. You could eliminate the month argument to list all pages in 2008.

[[include:_PagesByDate month=8 year=2008]]

Pages are listed with just the title linking to the full page by default. If you want to include the full page content, you can do so with the content=yes argument. This will also add some footer links that show the number of comments (if comments are enabled) and a link to the full page:

[[include:_PagesByDate content=yes]]

If you only want to show a specific number of pages in the list (with or without content) you can specify the limit argument. For example, this will show the full content of just the most recent page:

[[include:_PagesByDate content=yes limit=1]]

Finally, you can limit the pages displayed to child pages of a specified page. This allows you to create multiple categories or segments of date-based navigation. It's used by the soon-to-be-released Blog module to allow multiple blogs to co-exist on a single site. For example, if you have a page named MyBlog with child pages (blog posts), you can list just the posts using:

[[include:_PagesByDate root=MyBlog]]

There are a few other more advanced options not listed here, which you can read about at the support wiki.

Month Navigation

If you have lots of pages and want to provide a roll-up navigation of months and years, you can do so with _MonthNav. These links will point to the _PagesByDate include with options to show pages for a specied month and year. By default, _MonthNav lists all the months represented by any visible page with a page date value:

[[include:_MonthNav]]

Like _PagesByDate, the _MonthNav script supports the root and limit arguments to limit the results to pages under a specific parent and/or to a specific number of results:

[[include:_MonthNav root=MyBlog limit=12]]

There are more advanced options not listed here, which you can read about at the support wiki.

Combining Page Date with Parent Pages

As you can see with _PagesByDate and _MonthNav above, a powerful feature of date-based navigation is that pages can be grouped by a parent page. Consider using a parent page that has a _PagesByDate include as its content, and blog posts, events, new articles or press releases as its children. You can create a page template associated with the parent page, to carry it over to new pages created for that purpose. This kind of setup allows a blog to be implemented on a site, and is automated with the new Blog module, which will be released next week.

Using Excerpts

Last but not least... if you're wondering what is the purpose of the Excerpts field on the Properties panel of the edit form, the value can be displayed using the _PagesByDate include script. It's shown by default under the page titles if you don't include content=yes in a _PagesByDate include. Additional uses of this value will be revealed in future features and modules.

In Summary

As is stated at the beginning of this and the previous post, these features are like Legos. By themselves they may not be terribly interesting, but combined in creative ways they can be used to build highly structured large-scale web sites. Future features and modules will continue to show how these tools can be combined to create functionality. For example, a Blog Module to be released next week combines many of the techniques discussed in this post. These features are just the beginning - they will grow and mature over time to make EditMe the most flexible web publishing solution available.


 

Stay Connected with EditMe

Subscribe via Email

Your Email:

Delivered by FeedBurner