Friday, August 27, 2004

List of Postings that use a Particular Template

Site Manager provides many features that aren't available from the PAPI. One of them is a function that allows you to see a list of postings that make use of a particular template.

To generate the list:
1. Right-click on the template in Site Manager
2. Select Dependant Report
3. The browser opens, displaying a list of postings that are based on the selected template.

The dependant report is particularly useful when you are thinking of deleting the template but can't do so because there are postings that depend on it. With the list, you will know which templates you have to tackle before removing the template.

One drawback of this approach is that if you have a sizeable number of postings attached to the template, the script times out. When that happens, you will have to find other ways to get the information.

Wednesday, August 18, 2004

Where are my Resources?

One neat feature about MCMS is the ability to replace resources without the need to scour through all HTML pages to update hyperlinks. Once replaced, all postings that point to it immediately reference the most updated version of the resource. It's a total self-help module where Resource Managers have total ownership over their files. They don't have to bug developers any more about getting that document updated. Neat, eh?

Well, not quite. They still call. Before replacing a resource, resource managers want to know the pages on the site that are linked to it. Is the resource being used? If not, can it be deleted? Otherwise, where will it be seen? Will anything bad happen to them and their computer if they replaced/deleted the file?

And here's the point where I usually give that little smile and politely say, "I have no idea..."

Well, not any more. After being bugged a hundred times by resource managers asking what they should do with a ballooning collection of resources, I've decided to do something about it.

I have here, a script that scans through the entire site for a list of resources that are linked from placeholder content.

It uses a simple recursion to look for occurences of /NR/rdonlyres/ and grabs the GUID that comes after it. (Well, I could have used a pattern that matches GUIDs instead, but this allows me to filter out links to non-resource objects like channels and postings and potentially include files added as local attachments).

Once a resource is found, it writes to a CSV file:

  • path of the resource
  • path of the posting and
  • name of the placeholder that contains a link to it.
You can of course, use a database to store the data. Actually, that's what I'm doing for my sites - querying records from a database is much easier. But I'm sticking to a text file in this example to keep the code simple.

The script is good for a one-time scan. The next step would be to add some custom code in the workflow event handlers to scan placeholder content for links to resources when postings get published.

Download it

Friday, August 06, 2004

Sold a Mobile Phone through a Classifieds Application Managed by MCMS

Woohoo! I've just sold my first item through our company's Classifieds hosted on the intranet. Andy from the Billing department just got a fantastic deal for my mobile phone. Cool! What a great way to start the weekend.

What's also neat is that the Classifieds is an application entirely managed by MCMS!