src/pyams_default_theme/features/sitemap/__init__.py
changeset 366 4c4b26c3972a
parent 364 29a7a4bd7773
equal deleted inserted replaced
365:03631bacc240 366:4c4b26c3972a
    98         catalog = get_utility(ICatalog)
    98         catalog = get_utility(ICatalog)
    99         intids = get_utility(IIntIds)
    99         intids = get_utility(IIntIds)
   100         workflow = IWorkflow(context)
   100         workflow = IWorkflow(context)
   101         params = Eq(catalog['parents'], intids.register(context)) & \
   101         params = Eq(catalog['parents'], intids.register(context)) & \
   102                  Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
   102                  Any(catalog['content_type'], CONTENT_TYPES.keys()) & \
   103                  Any(catalog['workflow_state'], workflow.published_states)
   103                  Any(catalog['workflow_state'], workflow.visible_states)
   104         for version in unique_iter(CatalogResultSet(CatalogQuery(catalog).query(params))):
   104         for version in unique_iter(CatalogResultSet(CatalogQuery(catalog).query(params))):
   105             yield from product(II18nManager(version).get_languages(), (version,))
   105             yield from product(II18nManager(version).get_languages(), (version,))