Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
Commits
ef54976b
Commit
ef54976b
authored
May 19, 2017
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web: Fix Static Web Section URL resolution
parent
b616440e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
bt5/erp5_web/DocumentTemplateItem/portal_components/document.erp5.StaticWebSection.py
...eItem/portal_components/document.erp5.StaticWebSection.py
+10
-6
No files found.
bt5/erp5_web/DocumentTemplateItem/portal_components/document.erp5.StaticWebSection.py
View file @
ef54976b
...
@@ -54,14 +54,18 @@ class StaticWebSection(WebSection):
...
@@ -54,14 +54,18 @@ class StaticWebSection(WebSection):
if
isinstance
(
name
,
list
):
if
isinstance
(
name
,
list
):
name
=
name
[
0
]
name
=
name
[
0
]
if
not
name
or
name
in
(
"/"
,):
url_list
=
[]
else
:
url_list
=
[
name
]
url_list
=
[
name
]
while
len
(
stack
):
while
len
(
stack
):
if
stack
[
-
1
]
not
in
(
'/'
,
''
):
url_list
.
append
(
stack
.
pop
())
url_list
.
append
(
stack
.
pop
())
else
:
if
request
.
get
(
'ACTUAL_URL'
,
''
).
endswith
(
"/"
):
stack
.
pop
()
if
request
.
get
(
'ACTUAL_URL'
,
''
).
endswith
(
"/"
):
# or len(url_list) == 0:
url_list
.
append
(
"index.html"
)
url_list
.
append
(
"index.html"
)
self
.
log
(
"/"
.
join
(
url_list
))
return
DocumentExtensibleTraversableMixin
.
getExtensibleContent
(
self
,
request
,
"/"
.
join
(
url_list
))
return
DocumentExtensibleTraversableMixin
.
getExtensibleContent
(
self
,
request
,
"/"
.
join
(
url_list
))
def
_getStaticDocument
(
self
,
request
,
name
):
def
_getStaticDocument
(
self
,
request
,
name
):
...
...
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