momo: add slug to page id, to help debugging

This commit is contained in:
Frédéric Péters 2015-10-27 17:36:46 +01:00
parent 3a0915ee22
commit 289632669c
1 changed files with 3 additions and 2 deletions

View File

@ -43,7 +43,7 @@ def get_page_dict(request, page, manifest):
page_dict = {
'title': page.title,
'id': 'page-%s' % page.id,
'id': 'page-%s-%s' % (page.slug, page.id),
}
link_cells = [x for x in cells if isinstance(x, LinkCell)]
@ -65,7 +65,8 @@ def get_page_dict(request, page, manifest):
for cell in link_cells:
if cell.link_page:
# internal link
page_dict['seealso'].append('page-%s' % cell.link_page.id)
page_dict['seealso'].append('page-%s-%s' %
(cell.link_page.slug, cell.link_page.id))
else:
# external link
page_dict['seealso'].append('seealso-%s' % cell.id)