From 2ae267c6c1b4d2f6f88897144781f43cd190b5a0 Mon Sep 17 00:00:00 2001 From: helmutm Date: Fri, 27 Jun 2008 18:33:50 +0000 Subject: [PATCH] title index for concepts: do not include description git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@2727 fd906abe-77d9-0310-91a1-e0d9ade77398 --- concept.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/concept.py b/concept.py index 8e36ad2..d344044 100644 --- a/concept.py +++ b/concept.py @@ -400,22 +400,26 @@ class IndexAttributes(object): def text(self): ctx = self.context #return ' '.join((getName(ctx), ctx.title,)) + description = ctx.description + if isinstance(description, I18NValue): + description = ' '.join(description.values()) actx = adapted(ctx) indexAttrs = getattr(actx, '_textIndexAttributes', ()) #return ' '.join([getName(ctx), ctx.title, ctx.description] + - return ' '.join([self.title()] + + return ' '.join([self.title() + description] + self.creators() + [getattr(actx, attr, u'???') for attr in indexAttrs]).strip() def title(self): context = self.context title = context.title - description = context.description + #description = context.description if isinstance(title, I18NValue): title = ' '.join(title.values()) - if isinstance(description, I18NValue): - description = ' '.join(description.values()) - return ' '.join((getName(context), title, description)).strip() + #if isinstance(description, I18NValue): + # description = ' '.join(description.values()) + #return ' '.join((getName(context), title, description)).strip() + return ' '.join((getName(context), title)).strip() def creators(self): cr = IZopeDublinCore(self.context).creators or []