Displaying semantically related content with (stored) search pages
If you would like to show some content (assets, or links to assets) that relates to the content of any given page (and to stop having to manually add stuff in – i.e. to get others to do all the work ;-) ). A few good examples (of semantically related content) are; upcoming dates, PDF/Word docs, FAQs, Glossary terms or related pages.
Primer
If you would like to show some content (assets, or links to assets) that relates to the content of any given page (and to stop having to manually add stuff in – i.e. to get others to do all the work ;-) ).
This method was created due to the deficiencies with tagging & is a far sharper tool to work with. Not sure who pioneered this method, but I can tell you that I stole it from was inspired by Tait & Squiz NZ
A few good examples (of semantically related content) are; upcoming dates, PDF/Word docs, FAQs, Glossary terms or related pages.
Whilst setting this all up might seem like a lot of work, the payoff is the fact that the content always appears in the right places & the maintenance of it can be done by regular editors of your site.
Unfortunately the content that I have developed this for is in our staff intranet, so I’m unable to show you full pages.
Kicking it off
To cook up this wondrous recipe of jiggery pokery, you’ll need the following;
- A Thesaurus (full of thesaurus terms)
- A Metadata Schema
- A Paint Layout
- A Standard Page (or similar)
- A few Search Pages
- Some other content to show
- And maybe some folders to keep it all tidy
Combine together the ingredients over a low heat whilst stirring occasionally - No kidding ;-)
Here’s a little picture of how it will all work:

I find it easier to work with an actual example (maybe ‘cause I’m dyslexic), so I’ll use some of the stuff I’ve been working on. I also found it easier starting at the bottom of the site & working my way up through the hierarchy of the site.
Let’s say we have a Travel page in our staff intranet, so obviously there’ll be some web content for this as well as a bunch of forms & a policy. There’s also some content on the site which we think people will be interested in; Travel Insurance, Business Credit Cards, Conference Registrations & Foreign Currency.
So the next thing to do once we have the actual content for the page is to think about the taxonomy of the site (or sub-site). This is how we describe the content, I’d suggest starting small & getting feel for it first. In this case I chose to give each page asset a metadata value of topic. Here I used “Travel” as the topic for this page (N.B. title of page != Topic, a topic can & will be applied to more than one page). And in this nice little example each page has only one topic & a topic is applied to only one page.
Step 1.
Firstly create a Thesaurus asset & fill it with the topics that you want to apply to each of the pages. Just remember to set Hierarchy Mode to “Disabled”, so you can see all the terms you’ve added. One odd little thing you need to do is put in underscores (or similar) in the terms instead of spaces as the search pages will give you both those assets tagged with “Travel” & “Travel Insurance” when you do a search for “Travel”.
I created a thesaurus (as well as a metadata schema) for each of the sections of our intranet (HR, Finance, ICT etc) as there are many terms in each & I want to ensure that users (regular staff) will apply the right terms. After all according to Erica's first rule for working in ICT (one of my colleagues)
“You cannot predict what a user will do”. (Rules #13, #19 & #53 are appropriate here too)
Step 2.
Next up we need a Metadata Schema so we can fetch out the assets we need (and know what it is that we need to fetch). Something real basic is all that’s needed. I created one for the Finance section & a general one for the whole site. In it I added two fields: “Topic” & “Related Topics”, both of which were of type “Thesaurus”. These both were restricted to the Thesaurus asset that we created in the previously step (remember rule #1). I chose to make the Topic a required field but not the Related Topics.
No prizes for guessing that the next step is to apply this new metadata schema to all of the assets you wish to use it on, and don’t forget to apply the values you want to the content. There is no need to fill in the Related Topics field for those assets that will be end points; PDFs, Word docs, calendar dates etc.
Important Note: don’t cascade the metadata values! You’ll find out later why :-)
Getting the content out
So now the magic happens, to bring out all these linkages to the related content we need to paint on the content (this is the most scalable & gives us the most control). This paint layout & search pages will provide us with some nice lists that we can insert into the various parts of the page.
The easiest thing to provide is a list of documents (PDF/Word & the like) at the bottom of the page. E.g.

Step 3.
The best way to develop this type of functionally is to set it up outside of the paint layout & include it once it’s all going ;-) So set up the search page as you would normally, pulling the content from where you would normally.
Over to the Search Fields screen - I used “topic” as the search field name (keep the name the same I say), and set the “Data Source” to “Asset Metadata Field”. Now point this Asset Metadata Field, field to the topic field in the metadata we created in the second step. For the logic you only need to match at least one field.
Now go back to the bottom of the details screen where you need to setup the Stored Search.
Set “Show the Results page” to “Yes”, & set the Stored Query Location “Parameter” to “Search Field: topic” and “Source” to “GET Variable Name”
You should now be able to fetch this page using http://your domain/the/path/to/the/page?topic=travel and if you cross your fingers , wave a magic wand & throw about some pixie dust it should give you a list of assets.
Step 4.
Now we need to paint in this syrupy goodness, so create a Paint Layout to include the Search Page. In my Paint Layout I nested the Search Page into the page without any Presentation so that when there’s no content that’s related to the page there’s less html (& headaches to deal with later).
Along with the nesting of the content we need to tell the Search Page what to search for, so you need to add a GET variable of “topic” passing it a value of .
Then apply the paint layout to your pages, and with more waving of wands & throwing of pixie dust you should now have a page with a listing auto-magically created with Metadata & Search Pages.
Step 5.
Another easy thing to do is set up a glossary (or a FAQs), which I include in a column on the right-hand side of each of the pages.

This is pretty straight forward, each glossary term I made is a “Data Record” which I simply applied a third metadata schema too (Man! I love metadata :-D). The schema has one field of “glossary_definition” which is a type of Wysiwyg. So now it’s pretty easy to repeat the process of steps 3 & 4.
Step 6.
Ok now it’s time to ramp up the complexity a bit now. Now we want to show content that’s related to the page we’re looking at. Much the same as step 3, but his time we’re pulling out content that’s related to the content we have.

To show on the Travel page the related pages of Travel Insurance, Business Credit Card & Foreign Currency etc, we need to make sure that the pages we are trying to show have them themselves been tagged properly (i.e. the Foreign Currency page was tagged with the topic of “Foreign_Currency”). Then on the Travel page, it needs to have the Related Topics field tagged with the pages you think it should relate to.
Like step 3 create a stored Search Page & still use “topic” as the search field name. Likewise set the Stored Query Location “Parameter” to “Search Field: topic” and “Source” to “GET Variable Name”. BUT, this time in step 4 pass in a GET variable of “topic” with a value of .
Next, que the wands & pixie dust.
From this point on you can let your imagination run wild with the possibilities, I have pulled in related websites & related documents as well.
Step 7.
Now for the icing on this big sticky cake ;-) Let’s bring though some upcoming dates. This time we want to show the dates that relate to this topic in the first instance & then if there aren’t any, we need to expand our search out to the related topics.
So in order to pull off this piece of magical mastery we need two further search pages. Can’t use the same one twice I’m afraid, < facetiously> as Matrix doesn’t like recursive things for some silly reason </ facetiously>.
Now build a search page like before, but this time you’ll need to pass through a few more bits; topic = , relatedTopics = and for some silly reason I needed to add mode = results (must have mucked something up).
Do everything the same as before, the only addition is changes that we’re going to make to the No Results Page Layout. Here we need to make another search page (clone the first one if you like), and nest it in the No Results Page Layout passing through the GET vars; relatedTopics = & mode = results. Just this time the stored search needs to use the GET Variable Name of “relatedTopics”.
Step 8.
There really isn’t one, . . . maybe “unless someone like you cares a whole awful lot, nothing is going to get better.”1 and you’d care to help me think of ways to make this stuff even better.
What we have here in case you didn’t know is a precursor to RDF triples, so I’d like to know who else is taking this path with their web developments. The last remaining thing to be solved by all of this (besides the complexity) is having an ability to describe the relationship between the assets, like; the Travel Insurance page is strongly related to the Travel page, or, the Payment for overseas page is loosely related to the Travel page. These are things that the tagging page has tried to address, but I believe is incomplete & lacks the functionality that we really need (which is why we use metadata/search page Vs tagging/related asset listing page).
So I’d like anyone out there who’s got some ideas to throw them out into the open, go on, do it!
The next thing on my list of things to develop is some sort of smart mechanism to order the listings according to some sort of algorithm, like the number of times the pages are accessed multiplied by some sort of importance variable that we set, that way the most relevant items rise to the top & the least relevant items gravitate to the bottom of the list.
1 - Dr. Seuss, The Lorax
Tutorial Feedback
There is currently 4 comments.
Fair call
Guys, yes I'll be at the user conf, but I'll not be actually be talking about the technical how-to for this, more around the way to attack the problem & the reasons why you should do it.
So I'll have a go at re-doing this Tut. feedback appreciated :-)
Conference
As I see, Julian will show this on conference in October 2010. Hope there will be later some videos or PDF's that help me understand what he achieved.
Paweł Wojciechowski ()If you need any help let me know...
Let me know and I'll add you as an admin if you need further access to build this out. Thanks again for the tutorial. Having read it again it's a brilliant piece of work! Thank you!
Duncan Robertson ()Most interesting...
This is most interesting tutorial on this site, but it is too messy (I tried to read it many times without good results) :(
It would be great if You provide a working example. Maybe You can record click after click video or give a collection of images (what You click where) or just a instruction in steps (like a algorithm: 1. create metadata with this values: a, b, c; 2. create a thesaurus with terms: A, B, C...).
Images are nice but useless (besides of first one, rest is very similar).
Thanks again for this tut, hope You do something with this comment :)
Add Your Feedback
You must be logged in to leave a comment. You can sign-up for free!
