Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ludovic Kiefer
erp5
Commits
568479ae
Commit
568479ae
authored
Oct 03, 2012
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Take into account generate_nice_id argument (contributed by JP).
parent
562dfdb2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_generateSectionFromCategory.xml
...skins/erp5_web/WebSection_generateSectionFromCategory.xml
+12
-2
bt5/erp5_web/bt/revision
bt5/erp5_web/bt/revision
+1
-1
No files found.
bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_generateSectionFromCategory.xml
View file @
568479ae
...
@@ -95,8 +95,18 @@ def createWebSectionFromCategoryValue(container, category, depth, section_id=Non
...
@@ -95,8 +95,18 @@ def createWebSectionFromCategoryValue(container, category, depth, section_id=Non
else:\n
else:\n
section_id = getNiceID(category.getTitle()) or getNiceID(category.getId())\n
section_id = getNiceID(category.getTitle()) or getNiceID(category.getId())\n
except ValueError:\n
except ValueError:\n
if not generate_nice_id:\n
# It is not an int, so it can be used as is\n
# It is not an int, so it can be used as is\n
section_id = category.getId()\n
section_id = category.getId()\n
else:\n
if category.hasReference():\n
section_id = getNiceID(category.getReference())\\\n
or getNiceID(category.getTitle()) or getNiceID(category.getId())\n
if category.hasShortTitle():\n
section_id = getNiceID(category.getShortTitle())\\\n
or getNiceID(category.getTitle()) or getNiceID(category.getId())\n
else:\n
section_id = getNiceID(category.getTitle()) or getNiceID(category.getId())\n
# Create a new Web Section if necessary\n
# Create a new Web Section if necessary\n
new_section = None\n
new_section = None\n
if section_id not in container.contentIds():\n
if section_id not in container.contentIds():\n
...
...
bt5/erp5_web/bt/revision
View file @
568479ae
1089
1090
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment