Labels

accessibility (2) ADF (1) archiver (3) cmu (1) contributor (13) cookie (1) DAM (3) date (3) download (3) dynamic list (4) ephox (5) fatwire (1) fck (1) filters (1) folders (4) headers (2) IBR (3) ImageAlchemy (3) java (4) javascript (2) layout/template (4) link (6) locale (2) multilingual (1) rendition (3) replicator (4) rules (1) schema (1) search (11) sites (1) sitestudio (24) ssp/sspu (5) SSUrlFieldName (2) stellent (4) timezone (1) urm (1) weblogic (1) workflow (2)

Friday 2 January 2009

Better SiteStudio "Best Practices" - Secondary Pages

I've read a few blogs, webcasts and discussions about "best practice" for SiteStudio. They all seem to talk about the same obvious ideas. What I've been thinking about are some real-world issues and solutions, especially for scalability. Here's two I'm playing with now regarding secondary pages.

1. Use Primary Pages sparingly - rely on Secondary Pages
Forgive me for starting with a simple one... but I'm seeing websites where every page is generated from a primary layout. Yuck. This means every new page will need a new section. Every section in the entire site is stored in a single project file which quickly becomes stupidly massive. Only designers can edit sections. Sections need all sorts of settings done right or your site could become corrupted, even vanish. The content workflow processes are useless because sections can't be workflowed, you'll get a site full of sections with blank pages. Avoid this mess by using secondary pages.

What's the difference between primary and secondary? Well, let's start by understanding website sections. A section is the equivalent of a directory on a filesystem. The section however is a "virtual" directory - it's not a physical directory on any filesystem, it doesn't actually exist anywhere, the section is "generated" on demand. Anyway, if I go to a real directory in a normal website, I'll see a directory listing. Actually most websites are set up so that instead of seeing the listing, I'll see a default page, usually called index.htm - sounds familiar? In UCM terms this "default" page is your primary page, assembled using your primary layout. (Example: http://www.mydomian.com/mysite/mysection/index.htm)

But just as a directory can contain any number of files, a section can display any number of web pages. The primary layout can only display the one assigned content item as index.htm - so the secondary layout is used to display any other content item requested as a web page. The region in the secondary layout is not assigned to a particular content item, it is assigned as "replaceable." To see any content item in this section, simply append the ContentID to the section's URL and presto! there it is. Any item whatsoever can appear as a web page in this section (depending on security, conversion settings and so on) so you'll never need to modify any sections ever again! Woohoo! (Example: http://www.mydomian.com/mysite/mysection/ID000001) One final tip on this issue - you can (and usually should) use the same layout as the primary and the secondary, no probs.

2. Generate SEO-friendly filenames using SSUrlFieldName
The problem with secondary layouts is that the filename is just the ContentID, typically just a number with no file extension. Yuck! That's going to ruin your Google ranking and cause all sorts of confusement. (Example: http://www.mydomian.com/mysite/mysection/ID000001)

Give yourself real file names with the config value SSUrlFieldName. Create a metadata field (let's call it Bob) and then append your config.cfg file with SSUrlFieldName=Bob and presto! your web pages now use whatever filename Bob says. There is a catch - old mate Bob must know a unique filename for every content item, regardless of where it gets used. Bob can't talk about two items called about.htm (he gets confused) and expecting your contributors to give Bob the unique filename is delusional. The solution is to auto-generate it using the ContentTitle, the ContentID and a file extension. Replace spaces with dashes, truncate and then remove the leading zeros. (Example: http://www.mydomian.com/mysite/mysection/about-1.htm) Set this up as a global rule (newcheckin onsubmit) on your contribution instance - or as a archiver import rule on your consumption instance.

*****
I'll write a few more of these...

9 comments:

  1. I'm interested in more best practices with both development and administration. Enjoy your blog and subscribe to it!
    Thanks,
    -JLL

    ReplyDelete
  2. Nice blog. I look forward to some more!

    ReplyDelete
  3. Nice blog.

    In the 2 weeks since you left your former job, we've put up our first full multi CSS layout in the CMS.

    Now come back and help us transfer the other 50,000 pages into it.

    ReplyDelete
  4. It tested it in 11g. That doesn't work anymore.

    ReplyDelete
  5. I covered a few things in this article... what specifically doesn't work?

    ReplyDelete
  6. Thanks for this blog post! I have successfully implemented your recommendation of using a custom metadata field for the URL to call secondary page CDF’s to display in the replaceable region.

    Based on your experiences, do you have you any recommendations for providing different web page titles (that show in the web browser tab) for each of the secondary pages?

    Thanks for the tip about using unique values - I plan to test that again to make sure it hasn't been updated to be smart enough to check based on a section.

    ReplyDelete
  7. I like this idea, but what about sites that need a directory structure (we're using SSP to push our site out to Apache web servers)?

    Your approach works well for "news" type sites, in my opinion, where the structure doesn't really matter.

    ReplyDelete
  8. SSP has no problem with this approach. As long as the content is linked to, it will get published as a page. If you "need a directory structure" that's fine too, I'm just saying there's more to the system that just a one-page-per-directory structure.

    ReplyDelete