Collections and Vocabulary Values

3 messages Options
Embed this post
Permalink
Khairil Yusof-4 () Collections and Vocabulary Values
Reply Threaded More More options
Print post
Permalink
Using ATVocabularyManager for my vocabulary fields.

By indexing fields in catalog and adding metadata to portal_atct the
fields are showing correctly as options in Collection types.

The problem is that they're displaying the Keys and not Values of my
vocabularies.

What's the best way to make Collections automatically return a more
friendly and useful value, instead of keys?





-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Archetypes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/archetypes-users
ta6ae () Re: Collections and Vocabulary Values
Reply Threaded More More options
Print post
Permalink
Dear Khairil Yusof,

I've not implemented this myself but I did look briefly at what would be
required, to be able to show more user friendly values in the Collection
criteria screen, for a previous project.

Implementing and using a custom criteria type based on
ATSelectionCriterion.  Potentially just overriding the getCurrentValues
and getCriteriaItems methods.

See source code for more info:

For the definition of ATSelectionCriterion:
ATContentTypes/criteria/selection.py

For example of overriding ATSelectionCriterion:
ATContentTypes/criteria/portal_type.py

Good luck with this,

Tessa

Khairil Yusof wrote:

> Using ATVocabularyManager for my vocabulary fields.
>
> By indexing fields in catalog and adding metadata to portal_atct the
> fields are showing correctly as options in Collection types.
>
> The problem is that they're displaying the Keys and not Values of my
> vocabularies.
>
> What's the best way to make Collections automatically return a more
> friendly and useful value, instead of keys?
>
>
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Archetypes-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/archetypes-users




--
Tessa Alexander

Web Developer
Internet Development Group
Institute for Learning and Research Technology

http://www.ilrt.bris.ac.uk/id/


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Archetypes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/archetypes-users
Khairil Yusof-4 () Re: Collections and Vocabulary Values
Reply Threaded More More options
Print post
Permalink
On Sun, 2008-11-16 at 16:46 +0000, Tessa Alexander wrote:

> Dear Khairil Yusof,
>
> I've not implemented this myself but I did look briefly at what would be
> required, to be able to show more user friendly values in the Collection
> criteria screen, for a previous project.
>
> Implementing and using a custom criteria type based on
> ATSelectionCriterion.  Potentially just overriding the getCurrentValues
> and getCriteriaItems methods.
>
> See source code for more info:
>
> For the definition of ATSelectionCriterion:
> ATContentTypes/criteria/selection.py
>
> For example of overriding ATSelectionCriterion:
> ATContentTypes/criteria/portal_type.py

Thanks for the pointer, I also got how AT gets values from it's default
views from looking at code examples.

Thinking about it more, it looks like creating custom list views based
on the existing code would probably be best.


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Archetypes-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/archetypes-users