Personal tools
You are here: Home Products Tasty Bookmarks Documentation Tasty How-tos Add Subjects of the Bookmarkfolder to all Links inside this folder
Document Actions

Add Subjects of the Bookmarkfolder to all Links inside this folder

Warning: This item is marked as outdated.

This How-to applies to: 1.6.2

A small script executed in the context of a bookmarkfolder will add the subjects of the folder to all link objects.

As tasty and ATBookmarks had a different approach to categorize the links it may become necessary to add subjects to all links in one folder as a 'batch job' to get the most 'tasty experience' out of your bookmark collection.

Create a python script called setLinkSubjects in your custom folder:

# Add to folder subjects to  Subjects of all contained Links 
kwds = ()
objects = context.objectValues('ATLink')
for object in objects:
kwds = object.Subject() + context.Subject()
subjects = {}
for subj in kwds:
subjects[subj] = None
kwds = subjects.keys()
kwds.sort()
object.setSubject(kwds)
print object.Subject()

return printed

Run the script by appending setLinkSubjects to your Bookmarkfolder URL and update your portal_catalog afterwards.

by Christian Ledermann last modified January 16, 2007 - 12:30

For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by