Tag Cloud for items, searching items etc

Topics: Developer Forum, User Forum
Feb 20, 2008 at 6:46 PM
Hi Cristian

Have implemented a large image gallery using N2. All images are loaded into the DB as individual items and then presented as a collection on a single page (eg the parent item page).

Was wondering if I could implement a search feature so that images could be searched by name, and could even be tagged when uploaded and the tags then used to allow people to search the collection by tag..

What recommendations would you have for implementing something along these lines.

Thanks for your help///

excellent work!

Feb 20, 2008 at 9:22 PM
Hi Dom,

Interesting. First off searching items by name. Using the query api would probably work, e.g.


Then about the tags. One solution would be using the detail collection feature:

public class GalleryImage : N2.ContentItem
		public IList Tags
			get { return GetDetailCollection("Tags", true); }

Having the tags list you could either just add strings...
...or updating a separate collection of "TagItem"s
TagItem tag = GetOrCreateTag("Tagname");
The second option would allow you to aggregate some information.

To search items having a certain tag:
TagItem tag = GetTag("Tagname");

Jun 30, 2008 at 2:14 PM
Tag Cloud (and tagging) may be intersting in all contexts. a webpart should be usefull.