Tag Coulds

Hello,


I noticed in the latest Newsletter that matrix can do Tag Clouds. Is there anywhere we can find any more information about this?





thanks



kyle

Hi Kyle,


Where did you spot this reference?



Anyway, one way to create a tag cloud is to use the Search List asset to present a series of terms found in the Search Index. The number of occurrences of a given term in the index can be presented using the keyword %number_of_occurrences%. You could use this number of occurrences to help create a class that would style the text in the manner you want.

Hello Raena,


thanks for the reply.



the reference is http://www.squiz.net/news/mailout/newsletter_Q2_07



near the top on the right in the ‘Did you know?’ box.



I’d still like to know where the documentation on this is.



thanks again

You're not going to find any specific documentation on this.



You can do plenty of things in MySource Matrix using the standard tools like asset listings and paint layouts. That "Did you know" section is just there to point out that you can do things that you may not have known were possible because no specific asset type exists (like Tag Cloud Page for example). Our manuals show you have the tools work, but we don't have tutorials that describe how to build things like Image Libraries and Tag Clouds.

Hi Greg,


Thanks for the reply. I can understand that there are many, many undocumented items it Matrix that allow you to do more than most of us are aware and most likely need. However it would be nice, especially when a tease line is in the Matrix newletter, that a working example maybe available, even a simple howto. This I believe would highlight some of the lesser know features of Matrix and encourage the users to explore the features of this product to make there website even better.

This is why you should come to the MySource Matrix International Users Conference 2007. :slight_smile:

I'll be there, but a nice plug just the same… ;0)


Yes, I was told off for not plugging it enough, so I thought this was appropriate. :)

Noone talked about tag clouds at the conference!!!! :lol:


Maybe not around you, but outside it was Tag Clouds 24/7. :P

Seriously though, you're right -- must've slipped under the radar a bit. I'll see if I can prod Raena into writing up how we built the tag cloud for our internal knowledge base system.

Tag clouds, now that would be nice.

It's actually not that dramatic.


The tag cloud on our internal KB is done with the Search List asset, set to present search terms from the index based on a keyword metadata field. In the Search List you can customise the appearance of each item using keywords. You have two of these:


%search_term% - a linked search term that performs a search when clicked

%number_of_occurrences% - does exactly what it says on the tin


You could construct something like this:

    %search_term%


yielding you markup something like:

    foobar


You then need to have something in your CSS to indicate frequency and scale:

    span.tag {
    color: whatever;
    font-weight: bold;
    font-size: 0.8em;
    }
.rank1,
.rank2,
/* and so on, up to... */
.rank7 {
font-size: 100%;
}

.rank8,
.rank9,
.rank10,
/* etc */
.rank15 {
font-size: 120%;
}


.rank16,
/* etc */
.rank23 {
font-size: 150%;
}</pre><br />

... or something.

That's not bad if you have a fairly static set of content. But this has a maintenance overhead for growing sites, because as the number of items grows you may need to adjust your stylesheet to accommodate all these new .rank**-s that will appear. More convenient would be to devise a way to do this with JavaScript to get the biggest number and scale the others appropriately.

Any link to a working example?

The knowledge base is internal, I'm afraid.

Tried and failed miserably. Styling is fine, it's just getting the %number_of_occurrences% to work properly. I think I've done something wrong with the search asset. Damn it.

You should be using a Search List asset, not a Search Page, if that helps.

Right, I'm making progress and it looks like it's working. So yes, tag clouds are totally possible if your keyword data is clean.


[attachment=243:01.gif]



Unfortunately my keyword meta data is way too over optimised for any actual use semantically - (I would have to create 26+ classes for anything to look relative at all). So what I'm using is a search engine listing 'Standard Asset Fields - Asset Contents'.



But, that's a trully filthy way to do it and I'm getting loads of junk listed in there. I've cleaned up the results the best I could by hiding 1 - 6 occurences with CSS:



[codebox]<style type="text/css" media="screen">

.tag1 {

display: none;

visibility: hidden;

}



.tag2 {

display: none;

visibility: hidden;

}



/* And so on you know…*/



</style>[/codebox]



One screw up I got is that HTML characters are not being generated correctly by the Search List - ie. It's equals It39s? Could that have something to do with the character set?



The real SEO question is whether or not the Search Page can generate search strings? Keywords are nice, but having phrases would be absoluetly amazing…
01.gif (153 KB)



Try Keesings, the link below does a search for the word Churchill, then from the Topics panel on the left select cloud if its not already selected.

Did the guys in the UK do this?

http://tinyurl.com/2gynnw

:D

Thats a nice implimentation of tag clouds. Is this done completely with Matrix, if so whats the difference between the tag clouds and the cluster, and finally it would be nice to see a run sheet on how it's created.

Agreed! The tag cloud on Keesings is a ul which is pretty fancy.


Similar CSS to AVI's example:



[codebox]/* Cluster clouds */



li.cluster_cloud_1 {

font-size: 1em;

}



li.cluster_cloud_2 {

font-size: 1.1em;

}



li.cluster_cloud_3 {

font-size: 1.3em;

}



li.cluster_cloud_4 {

font-size: 1.4em;

}



li.cluster_cloud_5 {

font-size: 1.5em;

}[/codebox]



I want to know how they got search phrases in there. It must use the tagging system.