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)

Wednesday 10 November 2010

Add a "future release" icon to contribution mode

Ken posed a good question on the intradoc forums. He wrote:
Our editors have requested that we add a "Future Release" indicator to the Site Studio contribution mode screen, similar to the workflow icon that can appear... Does anyone know what the syntax for accessing the metadata of the content is?
I thought it was a great idea, so I looked into it.

Hiding primaryFile for SiteStudio

Kyle has a great article on hiding the primaryFile field from Content Server checkin pages. I just wanted to augment the solution by mentioning a way to hide the field only from SiteStudio checkin pages.

Sunday 24 October 2010

Thumbnail search in Content Server

I received an email from Stijn about displaying image thumbnails in UCM. Content Server comes with a search results template called "thumbnail view." Stijn commented that the thumbnail view was useless because all the content items used the same thumbnail, even if they were an image. This doesn't seem very useful... fortunately UCM doesn't have to work like that. Images and PDF documents can display a graphic thumbnail, here's how...

Thumbnails come from three places. The first place is an icon matched from the dDocType metadata field on the content item. The icon is useful for helping users to quickly identify content by type, but as Stijn pointed out, it is useless for searching for a specific image. (The icons can be updated from the Configuration Manager's "Options" menu, choose "Content Types.") This is the image you see only if no other thumbnail is defined.

The second place is from IBR (InBound Refinery.) IBR is used to process and convert content to different formats and this can include the generation of thumbnail images. The thumbnail is generated at check-in so each content revision gets one thumbnail. Go to the Configuration Manager's "Options" menu and choose "File Formats" to add or set the jpeg and gif extensions to use the ImageThumbnail conversion. Then tick the "Create thumbnail only for select graphics" option on the "File Formats Wizard" page (from the Content Server "Administration" menu under "Refinery Administration".) Finally, tell IBR how to generate the thumbnails on its "Additional Renditions" page. To change the thumbnail size, go to the Admin Server's General Configuration and add ThumbnailHeight=80 and ThumbnailWidth=80 (but it only applies to new checkins - use Archiver to apply retrospectively.) IBR is required for any content processing so it is worth installing, even if just for thumbnails.

The third place is from DAM (Digital Asset Management.) DAM is an extension to UCM that can create multiple renditions of an image, including a thumbnail rendition. DAM is installed on both Content Server and IBR and it requires some third-party software to perform the conversion, such as ImageMagick and ImageAlchemy (more info here.) DAM is probably overkill if all you want is thumbnails.

One final tip - you can force any search results page to display thumbnails by adding &listTemplateId=SearchResultsThumbnail to the URL. This is useful in the contribution editor for when the user is trying to insert an image because it overrides whatever view they have configured.

Friday 10 September 2010

Not so ready-to-replicate

One of the fab new features introduced in SiteStudio 10gR4 was the "Ready to Replicate" flag (let's call it R2R.) As discussed in some of my other posts, sections that are not marked as R2R are ignored by Archiver during the "Manage Site Replication" process - which finally makes site management a breeze. However an oddity has crept into subsequent versions of the SiteStudio component that I'd like to mention.

Friday 3 September 2010

Dynamic Lists & the Mystery of the Missing New Item

A common misunderstanding/complaint about Dynamic Lists on SiteStudio websites is the mystery of the missing new item. An author creates a new item using the nifty "Create New Item" wizard and at the end of the wizard the author is prompted to edit or exit, and save. Once saved, the new item disappears into the ether, never to be seen again! Huh? What is going on here? Try again... same result! Meanwhile some sub-editor somewhere is getting deluged with Workflow notifications for duplicate items... help!

This situation is commonplace on systems that are using Workflow. The newly created item is whisked away to the appropriate Workflow where it cannot be searched for or accessed until it meets approval. To the author, it looks like their item has vanished into thin air because it doesn't turn up in the Dynamic List that they are trying to update. This is an unfortunate but correct behaviour of Dynamic Lists!

Dynamic Lists simply return a list of content items that match a search criteria. The trick here is that Workflow revisions are never included in search results. Most of the time users don't notice because the search service will find the latest approved revision of an item, so if their item is in Workflow but has an older approved revision, the search will find that older revision as the latest approved. The situation faced here is that there is no older approved revision - the new item is trapped in workflow at revision 1, there is no latest approved revision! It cannot be searched for and it will not show up in any Dynamic List. But the item does exist and it can be found - it is parked safely on the Workflow page.

Mystery solved? Yes. Makes the system usable? No! How do we solve this conundrum?

The first revision needs to skip Workflow so that it can turn up in search results. Sounds simple enough, except now every new content item in the system is getting released without approval! Fortunately SiteStudio has an ace up its sleeve. It uses the "DontShowInListsForWebsites" metadata field to prevent a released content item from showing up on a website.

So, the solution is to:
  • Update the Dynamic List elements so that new items are created with their metadata preset to exclude them from the website;
  • Update the Workflow so that the first revision of any item is immediately released only if it is excluded from a website.
Done! The new item can now be found in the Dynamic List as an "excluded" item and it doesn't show up on the website. All an author has to do is turn off the "exclude" rule and their item is instantly visible on the website. They can do so directly from the Dynamic List (there are buttons in the list element toolbar that toggle excluded items) or they can update the item's metadata as they save their changes.

Thursday 26 August 2010

Contribution Folders explained - in portuguese!

Andre has written a post similar to mine that explains how Contribution Folders work. Funny how people still seem to misunderstand the concept. Oh yeah, his post is in Portuguese (use the Google translate thingy.)

His post: http://andrealmar.wordpress.com/2010/08/24/contribution-folders-use-com-moderacao/
My post: http://webmonkeymagic.blogspot.com/2010/01/contribution-folders-same-same-but.html

It's important to note that they are virtual folders, so they may look like folders on your desktop but they work a bit differently. Also you are crazy to use them on a consumption website... lol I can say that because I worked on a site that did just that (it probably still does) and it made sense at the time but I wouldn't do it like that again.

I was recently asked in a series of emails to figure out how to display the user's folders as a site map. I tried valiantly to explain that a site map on a website is unrelated to contribution folders... they insisted they understood but wanted the solution anyway. Funny stuff.

Monday 14 June 2010

Secrets of wcmFragment

The wcmFragment tag that came with SiteStudio10gR4 was a great new way to reference fragments. The big improvement with this tag is that the fragment no longer needs to leave any XML code in your pages. Here's an example of how to use it:
[!--$wcmFragment("myID","myContentId","myFragment",
     "mySnippet","myParameter=value")--]
However I've noticed a few documentation oddities regarding wcmFragment that were worth clarifying...

Wednesday 9 June 2010

UCM 11g - out now!

Oracle finally released the new and improved UCM 11g! Yeah, I'm a bit slow on the announcement but that's because Australia was in bed last night when it was released. You can download it here but crikey, it's a big download! Looks like the WCM and just about everything else is bundled inside. Full documentation here.

From what I've seen there's no new killer features, all the work is under the hood. Faster checkins, better performance, login/logout authentication, integration with WebLogic. The downside is that all the performance improvements mean more grunt is needed from your hardware, but it hardly used much anyway.

I've already commented on the WCM improvements in my previous post but apparently the ability to drop SiteStudio editbale content into any non-SiteStudio website is a big ticket item (they're touting JDeveloper as their IDE of choice.) Also, DAM functionality is improved to better support flash objects, PSD files and selecting image renditions (previously renditions required a custom component to select them, I guess it's been rolled into the system.) The Desktop Integration Suite features are upgraded, good for users who rely on Contribution Folders.

Fortunately they've provided some info on how to upgrade from 10g so the question is, how long before we're all using 11g?

*** UPDATE: There does not appear to be a way to use UCM 11g without using WebLogic. This contradicts pre-release reports that said WebLogic was not compulsory. You should read this to understand it.

Monday 24 May 2010

SiteStudio 11g preview

I've stumbled across the documentation for SiteStudio 11g on the Oracle website.

The documentation is more extensive than previous versions. It includes previously undocumented configuration flags, idoc script extensions and services, and custom element form APIs. Some nice gems in there.

It looks like the 10gR4 format for region definitions has become the standard, the 10gR3 and earlier versions are considered "legacy" format. Unfortunately 11g does not look like it will support other scripting languages, rumoured to include PHP, and the pre-existing support of ASP & JSP is still restricted to legacy sites.

In fact, it just looks like the very latest 10gR4 rebranded. But is this a good thing or bad thing? Content Server 11g will require WebLogic and other new infrastructure bits so maybe minimal tinkering to websites is a good idea for now. My favourite gripe, the LinkWizard has not been touched but at least the Contribution Window has dumped the tiny floppy disk icon for a big "Save" button.

The big change is the improved SSPU. Now called "Site Studio Publisher" it is a Content Server component and it can be accessed directly from the Content Server menus. It finally provides the ability to crawl and publish a specific page on demand, rather than the whole site - which contributors can do themselves, right from the page! It has a typical Content Server interface and can support specified custom querystrings in page URLs. It still supports post-crawl filters and post-publish triggers, but best of all, it appears to be compatible with 10gR3.

The SiteStudio documentation can be accessed here:
http://download.oracle.com/docs/cd/E14571_01/doc.1111/e10615/toc.htm

Saturday 20 February 2010

Comparing Dates and Time Zones

Date and time calculations are a bit tricky in UCM. Unlike regular numbers, dates and times cannot be calculated or compared to one another directly.

Comparing numbers is easy, consider this example:
<$if 6 gt 5$>
This code is always true!
<$endif$>
Dates and times cannot be compared this way unless they are converted to numbers, using toInteger(). Unfortunately there is no way to turn that number back into a date, so it's not too useful. A better way to manipulate timestamps without converting them is to simply "parse" them, using the parseDate() function.
<$myBirthday = "5/3/77"$>
<$if parseDate(myBirthday) gt parseDate("18/09/1970")$>
I was born after Hendrix died, on <$myBirthday$>!
<$endif$>
Parsing a date depends on the format of the timestamp. There are many different formats for timestamps so you'll need to figure out which ones are used by your UCM installation. The system locale decides how to format and recognise timestamps. For example, the UK locale uses dates in d/M/yy format, whereas the US locale is M/d/y. The system locale and timezone are chosen when UCM is first installed. Users can choose to use their own locale and change the way dates and languages are displayed just for them. UCM will recalculate timestamps and present the correct timezone for the user's locale whenever they look at a date, but continue to store dates according to the system locale. Any dates that are entered need to follow the (user) locale's recognised date formats, which may or may not include seconds, military hours and so on. The system locale can be changed on reboot using the SystemProperties utility; the user local is easily switched from the Content Server "My Profile" page.

Apart from simple date/time comparisions, UCM can also do a great job at converting a given timestamp to the current timezone, adding daylight saving as required for us. You will need to tell it what timezone you are converting from by manually adding the timezone and then explaining the format of the timestamp. Use zz to indicate a timezone code. For example, let's convert the new year's countdown in New York to my local time (Sydney) and see when they'll join in on our party.
<$parseDateWithPattern("1/1/11 America/New_York",
"d/M/y zz")$>
Unfortunately there doesn't seem to be a built-in way of converting the local timestamp to a specified timezone. I get around this by calculating the difference between a date in local time and the same date specified as another timezone, then adding that difference to my local time. For example, when we're doing the new year's countdown in Australia, how far behind will the UK be?
<$newYearUK = parseDate("1/1/2011")
+ toInteger(parseDate("1/1/2011"))
- toInteger(parseDateWithPattern("1/1/2011 Europe/London",
"d/M/yy zz"))$>
One of the quirks I've observed with handling date objects is that errors are not reported in the server output log. Your code simply keeps going like nothing happened! This makes problems difficult to trace and you'll get unexpected results. It's a good idea to print out your timestamps as you manipulate them so you can see where any problems are.

**** UPDATE ****
Alec Kloss sent me an email with the following tip:
"...you should be able to go to any Content Server generated page and append
&UserTimeZone=America/Chicago
to the end of the URL and... that will change the timezone of all displayed times accordingly."
Nice one!

Wednesday 10 February 2010

Copy a SiteStudio site? Even easier!

SiteStudio 10gR4 (546) is chock full of awesome new features, one of which is a new way to replicate your site. Yes, the previous article I just wrote about replication is already obsolete. Ha!

The new feature is section level replication and it's pretty nifty. It is enabled via the Designer application and it adds a new section property, called "Ready to replicate." If you switch region content anywhere on a webpage, the property automatically changes to false. You can see this on your webpage in the contribution mode banner as a "replicate" or "don't replicate" button. Now I have to confess... I haven't got a system set up to test this new replication functionality but I assume it is all part of the Manage Site Replication page*. Archiver should rebuild the project file on import and ignore the sections where "Ready to replicate" is false. Why did I say Archiver "should" rebuild? I haven't found a shred of documentation to explain any of this stuff, I'm just guessing (it only got a mention in the release notes textfile.)

Some other awesome features in recent SiteStudio releases include:
  • Compare renditions - any renditions, not just the latest! On the Content Information page, in the revision history table, a new column is appended that allows you to compare the current revision to any other revision, future or past.
  • Setting a default page name (instead of manually changing index.htm)
    SSDefaultUrlPageName=default.html
  • Downloading images and documents from a friendly URL (the current directory) not the WebLocation (buried in the /groups/public/documents directories.)
    SSEnableDirectDelivery=true
  • Oh and those stubbornly clinging to the Ephox editor, don't forget the "ondemand" editors option that was included a few releases prior. It lets you say how many elements get loaded automatically and how many must be clicked on to load. If your page has more than three or four elements then Ephox (Java) is likely to hang your machine, so this setting is a godsend.
    SSUseOnDemandEditors=true
There's more great features too, so do yourself a favour and upgrade.

* UPDATE
Section Level Replication works great! I was right, it works via the "Manage Site Replication" page with Archiver. Note that the project file's native file is modified to exclude sections but not the weblayout file. Strange but true.

Monday 8 February 2010

How to copy a SiteStudio site

A question that pops up quite often how to copy a SiteStudio website, or maybe just a part of it. UCM is a content management system so by definition it tries to reuse content and prevent duplication! But there are situations where it is desirable to duplicate or replicate your site, like for a training demo or for backup purposes. There are a number of techniques to do this but surprisingly few people know how, or how do it really easily.

The best method for replicating site sections to another UCM instance is to use the SiteStudio Replicator application. This application can select individual website sections to replicate (or the whole lot.) It can also overwrite or retain the region content assignments on the target server, along with other section properties including custom section properties. A few simple clicks and the site structure is replicated. You don't need any firewall exceptions or UCM providers to connect the servers, you don't need to check in any content. Easy! It is already installed on your local machine alongside the SiteStudio Designer application, look for it in your Windows Start menu.

But we're still stuck on website duplication. There is an inherent problem here - website sections rely on unique section IDs - you can't simply duplicate a website, because you'll get duplicate website sections! If you really really need to duplicate a site or some site sections, download the project file xml and manually copy + change ALL the section IDs (append a letter to them all.) This is fraught with danger; the simplest mistake will cripple the entire website.

Other site replication methods include:

The Backup and Restore page basically downloads an entire site and all its config and bits and pieces and wraps it all up in a zip file. I suppose this is the cleanest way to backup a site but it doesn't duplicate a site. It has to be run manually and it creates a nasty big zip file. Not really useful unless you're doing a training demo and want to obliterate any changes when you import. It's in Content Server under the menu Administration > Site Studio Administration > Backup and restore.

The Manage Site Replication page uses the power of Archiver to replicate a site to another UCM instance with the benefit of running automatically as content changes. It can be configured to include the website content and/or the website structure (the project file which describes all the site sections.) The problem here is that it will replicate the entire site structure, which is typically not ideal. Most websites are constantly under development and require a planned launch, not an automatic deployment! It's best for synchronising content only, keep the project file out of it. It's in Content Server under the menu Administration > Site Studio Administration > Manage Site Replication.

Friday 22 January 2010

Custom UCM pages - without components!

Check out this fabulous tip on Kyle's blog - provided by my old Stellent mentor and all-round nice guy Ed Bryant.
I'm gonna go replace my UCM search pages right now...

Monday 4 January 2010

Contribution Folders: Same Same But Different

There seems to be a lot of people who misunderstand the Contribution Folders feature of UCM. Crikey, half the features seem to be misunderstood. Things like UCM security Accounts being mistaken for Microsoft Active Directory accounts, or SiteStudio website Sections being confused with directories in a website. Like a popular t-shirt in Cambodia says, they are "Same Same But Different."

Contribution Folders may look like regular directories or folders on your desktop but they are definitely not the same thing and definitely should not be used the same way. So what is a Contribution Folder anyway? Glad you asked.

A Contribution Folder is a fancy name for a webDAV access point. It allows you to drag-n-drop files from your machine right into the Content Server. How cool is that? However, the Content Server is not a filesystem like your computer, it's a content management system organised by metadata. The Contribution Folders are just virtual folders - they don't physically exist; there are no corresponding directories in the filesystem. A Contribution Folder is just a metadata value attached to a content item.

Think of them more like the "labels" feature in Gmail. A bunch of emails with the same label can all be displayed together or modified together, regardless of where they are located in your mailbox. Contribution Folders work in a similar way. There is a slight difference though; you can't have more than one folder assigned to an item. This makes folders unsuitable for organising your content, so only use folders for the easy drag-n-drop experience.

Now here's the tricky part. Content management requires all content to have metadata assigned. So it's easy to drag-n-drop your files into the system, but what metadata will it get? What security group is applied? This is where the Contribution Folder takes over. The folder itself can be preset with metadata that gets automatically applied to all files dragged inside it. So if you drop 15 images into the folder, all 15 get the same security group applied. Pretty neat, eh? No more pesky checkin forms. But what happens when you need to apply a different security group? Well, just create a different folder and drag into it. But now things start to get tricky. Which folder do you drag into? What happens if you use the wrong one? How deep do your folders go? Who is assigning the correct metadata to the folders? How much does a Cambodian t-shirt cost anyway? Folder management is tricky for the sysadmin and easily abused by contributors, so keep their use to a minimum.

Here's a few pointers about using folders:
  • Items inside a folder must have unique file names. If you try to drag into a folder a new file with the same filename as an existing item in that folder, it will become a new revision of the existing item.
  • Items can be "deleted" from folders. This means they get moved to the "trash" folder. However those items still turn up in search results and appear in websites! You'll need to delete from the trash folder to destroy the item.
  • Contribution Folders should only be present on your contribution instance. They should definitely not be used in consumption and there's little to no reason for using them on dev or testing environments.
  • Should you require folders installed on two or more connected environments, keeping them in sync is problematic. There is no way to control the creation of folder IDs (it is sequential only) so you must use the replication procedure, which is a tricky thing to set up. Never create folders on the other environments or you'll break your replication.
  • Each folder slows down your system. There is a default limit of 1000 folders. If you reach that limit... well, you're not using them properly. Read this post again!