[Logo] Infoglue - Official Forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Please can someone explain categoryCondition in the content:matchingContents tag  XML
Forum Index » Component Development
Author Message
arcotc

Expert

Joined: 11/11/2009 14:24:05
Messages: 72
Offline

In the developer manual I see the following code:

<content:matchingContents id="articles" contentTypeDefinitionNames="Article,News" categoryCondition="Area=/Areas/Medicine"/>

I understand that the content types being searched in the above example are Article and News, but I don't understand where the categoryCondition values come from. I have looked at the content type definition for article and can not find any Area property on it, never mind the value /Areas/Medicine!

Please can someone point me in the right direction?

Thanks,

Mark.
jaric

Admin
[Avatar]

Joined: 02/11/2009 10:09:03
Messages: 107
Location: Uppsala
Offline

From memory (and a quick look into a component I've written):

Area should be added as an attribute under "Defined Categories" in the content type Article. It should have a base category picked from somewhere in the category tree. Under that base category there should be a category Areas and that in turn should contain at least the category Medicine.

Then you can assign /Areas/Medicine to the category attribute Area for a specific Article. And it would be found by a search with categoryCondition="Area=/Areas/Medicine".

Something like that. If you need more info, don't hesitate to ask.

This message was edited 1 time. Last update was at 15/01/2010 15:51:30


Peter Jaric
Division for IT and Procurement
Uppsala University
[WWW]
arcotc

Expert

Joined: 11/11/2009 14:24:05
Messages: 72
Offline

Jaric,

Thanks, that was very helpful and worked perfectly.

Mark.
jaric

Admin
[Avatar]

Joined: 02/11/2009 10:09:03
Messages: 107
Location: Uppsala
Offline

Great!

Peter Jaric
Division for IT and Procurement
Uppsala University
[WWW]
 
Forum Index » Component Development
Go to:   
Powered by JForum 2.1.8 © JForum Team