Plone categories/keywords Can you make some permanent?

13 Messages Forum Options Options
Permalink
L Alford
Plone categories/keywords Can you make some permanent?
Reply Threaded More
Print post
Permalink
Using Plone 3.0.6

I've noticed that the categories or /portal_catalog/Indexes/Subject keywords disappear when the last document using that keyword is removed or no longer associated with that keyword.

Is it possible to lock in some of these keywords so they remain even if no documents in Plone currently use them?

Lynn

--
Lynn Alford Programmer in Black
MSN: nicarra60@... Y!: nicarra60
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Andreas Jung-5
Re: Plone categories/keywords Can you make some permanent?
Reply Threaded More
Print post
Permalink


--On 16. Mai 2008 13:58:27 +1000 Lynn Alford <lynn.alford@...> wrote:

> Using Plone 3.0.6
>
> I've noticed that the categories or /portal_catalog/Indexes/Subject
> keywords disappear when the last document using that keyword is removed
> or no longer associated with that keyword.
>
> Is it possible to lock in some of these keywords so they remain even if no
> documents in Plone currently use them?

Basically no.

Andreas

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users

attachment0 (201 bytes) Download Attachment
Raphael Ritz
Re: Plone categories/keywords Can you make some permanent?
Reply Threaded More
Print post
Permalink
Andreas Jung wrote:

>
>
> --On 16. Mai 2008 13:58:27 +1000 Lynn Alford
> <lynn.alford@...> wrote:
>
>> Using Plone 3.0.6
>>
>> I've noticed that the categories or /portal_catalog/Indexes/Subject
>> keywords disappear when the last document using that keyword is removed
>> or no longer associated with that keyword.
>>
>> Is it possible to lock in some of these keywords so they remain even
>> if no
>> documents in Plone currently use them?
>
> Basically no.

Effectively yes ;-)

While Plone never really grew full support for the meta data tool
the CMF supports meta data policies since ages including cases
like the one here.

It's a bit hidden and probably undocumented but here we go:
ZMI -> portal_metadata -> schema tab (should be the default
view of the tool in ZMI) -> click DCMI in the Metadata Schemas
section (why do so many people not know that the plural form
of 'schema' is 'schemata' - but I digress ...) -> click
'Subject' within the 'Element' row -> add terms to the
vocabulary field - in the upper part if this should apply
to all portal types (don't forget to press 'Update') or
in the lower part to define a portal type specific policy.

BaseObject's 'Vocabulary method is clever enough to pick
up the policy.

BTW: Plone uses this itself to provide the event types - or
at least used to do it that way. In the Plone 3.0.6 I'm currently
messing with this is not the case but that may just be my local
setup.

Raphael




>
> Andreas
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Plone-Users mailing list
> Plone-Users@...
> https://lists.sourceforge.net/lists/listinfo/plone-users


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Martin Aspeli-2
Re: Plone categories/keywords Can you make some permanent?
Reply Threaded More
Print post
Permalink
Lynn Alford wrote:
> Using Plone 3.0.6
>
> I've noticed that the categories or /portal_catalog/Indexes/Subject
> keywords disappear when the last document using that keyword is removed
> or no longer associated with that keyword.
>
> Is it possible to lock in some of these keywords so they remain even if
> no documents in Plone currently use them?

Not by default. You'd need to customise the keywords field to use a
different type of vocabulary. It currently uses
portal_catalog.uniqueValues('Subject'), I think.

Martin

--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Raphael Ritz
Re: Plone categories/keywords Can you make some permanent?
Reply Threaded More
Print post
Permalink
Martin Aspeli wrote:

> Lynn Alford wrote:
>> Using Plone 3.0.6
>>
>> I've noticed that the categories or /portal_catalog/Indexes/Subject
>> keywords disappear when the last document using that keyword is removed
>> or no longer associated with that keyword.
>>
>> Is it possible to lock in some of these keywords so they remain even if
>> no documents in Plone currently use them?
>
> Not by default. You'd need to customise the keywords field to use a
> different type of vocabulary. It currently uses
> portal_catalog.uniqueValues('Subject'), I think.

No, it uses

   Archetypes/skins/archetypes/collectKeywords.py

which contains

   ...
   allowed, enforce = context.Vocabulary(name)
   catalog = getattr(container, vocab_source)
   previous = catalog.uniqueValuesFor(index)
   ...

where the index values are only one part of the
vocabulary.

Raphael


>
> Martin
>


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
L Alford
Re: Plone categories/keywords Can you make some permanent?
Reply Threaded More
Print post
Permalink


On Fri, May 16, 2008 at 6:42 PM, Raphael Ritz <r.ritz@...> wrote:
Andreas Jung wrote:
>
>
> --On 16. Mai 2008 13:58:27 +1000 Lynn Alford
> <lynn.alford@...> wrote:
>
>> Using Plone 3.0.6
>>
>> I've noticed that the categories or /portal_catalog/Indexes/Subject
>> keywords disappear when the last document using that keyword is removed
>> or no longer associated with that keyword.



Effectively yes ;-)

It's a bit hidden and probably undocumented but here we go:
ZMI -> portal_metadata -> schema tab (should be the default
view of the tool in ZMI) -> click DCMI in the Metadata Schemas
section (why do so many people not know that the plural form
of 'schema' is 'schemata' - but I digress ...) -> click
'Subject' within the 'Element' row -> add terms to the
vocabulary field - in the upper part if this should apply
to all portal types (don't forget to press 'Update') or
in the lower part to define a portal type specific policy.

Worked brilliantly.  Now we can have some permanent keywords without any hassle.

Thanks!


--
Lynn Alford Programmer in Black
MSN: nicarra60@... Y!: nicarra60
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Raphael Ritz
Re: Plone categories/keywords Can you make some permanent?
Reply Threaded More
Print post
Permalink
Lynn Alford wrote:

>
>
> On Fri, May 16, 2008 at 6:42 PM, Raphael Ritz
> <r.ritz@...
> <mailto:r.ritz@...>> wrote:
>
>     Andreas Jung wrote:
>      >
>      >
>      > --On 16. Mai 2008 13:58:27 +1000 Lynn Alford
>      > <lynn.alford@...
>     <mailto:lynn.alford@...>> wrote:
>      >
>      >> Using Plone 3.0.6
>      >>
>      >> I've noticed that the categories or /portal_catalog/Indexes/Subject
>      >> keywords disappear when the last document using that keyword is
>     removed
>      >> or no longer associated with that keyword.
>
>
>
>     Effectively yes ;-)
>
>     It's a bit hidden and probably undocumented but here we go:
>     ZMI -> portal_metadata -> schema tab (should be the default
>     view of the tool in ZMI) -> click DCMI in the Metadata Schemas
>     section (why do so many people not know that the plural form
>     of 'schema' is 'schemata' - but I digress ...) -> click
>     'Subject' within the 'Element' row -> add terms to the
>     vocabulary field - in the upper part if this should apply
>     to all portal types (don't forget to press 'Update') or
>     in the lower part to define a portal type specific policy.
>
>
> Worked brilliantly.  Now we can have some permanent keywords without any
> hassle.
>

Glad to hear it's working for you ;-)

And I think I recall now why we - Plone - stopped using this
approach for the event vocabulary: there is basically no support
for multilingual/translated vocabularies that way.

Raphael


> Thanks!
>
>
> --
> Lynn Alford Programmer in Black
> MSN: nicarra60@...
> <mailto:nicarra60@...> Y!: nicarra60
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Plone-Users mailing list
> Plone-Users@...
> https://lists.sourceforge.net/lists/listinfo/plone-users


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Robert Gravina
Re: Plone categories/keywords Can you make some permanent?
Reply Threaded More
Print post
Permalink

On 16/05/2008, at 6:46 PM, Raphael Ritz wrote:

> Martin Aspeli wrote:
>> Lynn Alford wrote:
>>> Using Plone 3.0.6
>>>
>>> I've noticed that the categories or /portal_catalog/Indexes/Subject
>>> keywords disappear when the last document using that keyword is  
>>> removed
>>> or no longer associated with that keyword.
>>>
>>> Is it possible to lock in some of these keywords so they remain  
>>> even if
>>> no documents in Plone currently use them?
>>
>> Not by default. You'd need to customise the keywords field to use a
>> different type of vocabulary. It currently uses
>> portal_catalog.uniqueValues('Subject'), I think.
>
> No, it uses
>
>   Archetypes/skins/archetypes/collectKeywords.py
>
> which contains
>
>   ...
>   allowed, enforce = context.Vocabulary(name)
>   catalog = getattr(container, vocab_source)
>   previous = catalog.uniqueValuesFor(index)
>   ...
>
> where the index values are only one part of the
> vocabulary.


Is it possible to override this script to use a vocabulary of items  
plus whatever others the Manager user has added on content later?? Is  
there a newer Plone 3 style hook into this?

I'd like a fixed set of tags in my site also, but I'd like to do it in  
a repeatable way (i.e. not through the ZMI :)).

Robert

-------------------------------------------------------------------------
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=/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
gzucker1
Re: Plone categories/keywords Can you make some permanent?
Reply Threaded More
Print post
Permalink
Hi,

I have a related question.
I'm using categories on plone 3.0. Accidently I tagged a page I did not want to categorize. I have been unsuccessfully trying to remove the keyword since then (one keyword "must" be marked).
Any ideas on how to make an item "not categorized" without removing it completely and rewriting it?

Thanks,

Guy

On Wed, Jul 23, 2008 at 6:12 AM, Robert Gravina <robert@...> wrote:

On 16/05/2008, at 6:46 PM, Raphael Ritz wrote:

> Martin Aspeli wrote:
>> Lynn Alford wrote:
>>> Using Plone 3.0.6
>>>
>>> I've noticed that the categories or /portal_catalog/Indexes/Subject
>>> keywords disappear when the last document using that keyword is
>>> removed
>>> or no longer associated with that keyword.
>>>
>>> Is it possible to lock in some of these keywords so they remain
>>> even if
>>> no documents in Plone currently use them?
>>
>> Not by default. You'd need to customise the keywords field to use a
>> different type of vocabulary. It currently uses
>> portal_catalog.uniqueValues('Subject'), I think.
>
> No, it uses
>
>   Archetypes/skins/archetypes/collectKeywords.py
>
> which contains
>
>   ...
>   allowed, enforce = context.Vocabulary(name)
>   catalog = getattr(container, vocab_source)
>   previous = catalog.uniqueValuesFor(index)
>   ...
>
> where the index values are only one part of the
> vocabulary.


Is it possible to override this script to use a vocabulary of items
plus whatever others the Manager user has added on content later?? Is
there a newer Plone 3 style hook into this?

I'd like a fixed set of tags in my site also, but I'd like to do it in
a repeatable way (i.e. not through the ZMI :)).

Robert

-------------------------------------------------------------------------
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=/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users


-------------------------------------------------------------------------
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=/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Yuri-11
Re: Plone categories/keywords Can you make some permanent?
Reply Threaded More
Print post
Permalink
Guy Zucker ha scritto:
> Hi,
>
> I have a related question.
> I'm using categories on plone 3.0. Accidently I tagged a page I did
> not want to categorize. I have been unsuccessfully trying to remove
> the keyword since then (one keyword "must" be marked).
> Any ideas on how to make an item "not categorized" without removing it
> completely and rewriting it?

try with this:

http://plone.org/products/plonekeywordmanager

-------------------------------------------------------------------------
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=/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
gzucker1
Re: Plone categories/keywords Can you make some permanent?
Reply Threaded More
Print post
Permalink
Hi Yuri,

Thanks for the quick reply. I looked at the link and it appears to be a product intended for maintenance of the site's keyword list. I have no problem with the keyword's list I just want to "uncategorize" a single page. Is there no simpler  mechanism (no add on) to do that?

BTW, you recommended the collective.roundedcornes product to me on a different thread, and I haven't been able to find it anywhere. Any clues?

Thanks again,

Guy



On Wed, Jul 23, 2008 at 11:30 AM, Yuri <yurj@...> wrote:
Guy Zucker ha scritto:

Hi,

I have a related question.
I'm using categories on plone 3.0. Accidently I tagged a page I did not want to categorize. I have been unsuccessfully trying to remove the keyword since then (one keyword "must" be marked).
Any ideas on how to make an item "not categorized" without removing it completely and rewriting it?

try with this:

http://plone.org/products/plonekeywordmanager


-------------------------------------------------------------------------
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=/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Ricardo Alves-2
Re: Plone categories/keywords Can you make some permanent?
Reply Threaded More
Print post
Permalink
Guy Zucker wrote:
> Hi,
>
> I have a related question.
> I'm using categories on plone 3.0. Accidently I tagged a page I did
> not want to categorize. I have been unsuccessfully trying to remove
> the keyword since then (one keyword "must" be marked).
> Any ideas on how to make an item "not categorized" without removing it
> completely and rewriting it?
>

It seems to be working fine to me. I can deselect them all. Just make
sure you're using the Ctrl/Cmd key to disable all options.


Ricardo

--
Ricardo Alves <rsa@...>
Eurotux <http://www.eurotux.com>


-------------------------------------------------------------------------
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=/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users
Marcin Ko?oczek
Re: Plone categories/keywords Can you make some permanent?
Reply Threaded More
Print post
Permalink
Ricardo Alves pisze:
> It seems to be working fine to me. I can deselect them all. Just make
> sure you're using the Ctrl/Cmd key to disable all options.
>
> Ricardo

It's not connected to Plone in any direct way, but from my experience I
can tell, that I'm very, very often astonished, that people do not know
about such a key combination (that is to select more than one option or
deselect one)!

Maybe it would be usefull to point this in Plone's docs every time this
kind of field is pointed/described? I'm not sure it's not already the
case, but some time ago there was nothing about this directly avaiable
to a reader AFAIR, at least not when speaking of deselecting option(s).

Or to do some 'workaround' for such a users (that is add another way to
deselect options), for example with an additional button to deselect all
options (it shouldn't be very complicated to include widget with
appropriate 'button with javasrcipt' in the simpliest solution), or
checkbox (to enable/disable field) for every such a field  which is not
forced to have at least one item selected...

Just a thought ;)

/Ramok

-------------------------------------------------------------------------
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=/
_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users