Commit 6f98e185 authored by Ivan Tyagov's avatar Ivan Tyagov

Generate Web Page permanent URL in the same way as any other document types.

(even though Web Page can in theory be considered a proper HTML document directly accessing it without wrapper site UI is not default preferred option).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36361 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 310e859a
......@@ -94,7 +94,7 @@
- change the behaviour of WebSection_getPermanentURL\n
for documents which are not published.\n
"""\n
html_portal_type_list = (\'Web Site\', \'Web Section\', \'Web Page\')\n
html_portal_type_list = (\'Web Site\', \'Web Section\')#, \'Web Page\')\n
portal_type = document.getPortalType()\n
\n
# If no reference is defined, no way to build a permanent URL.\n
......@@ -109,6 +109,7 @@ portal = context.getPortalObject()\n
valid_portal_type_list = portal.getPortalDocumentTypeList()\n
portal_type = document.getPortalType()\n
if portal_type not in valid_portal_type_list:\n
\n
if view and portal_type not in html_portal_type_list:\n
return \'%s/view\' % document.absolute_url()\n
return document.absolute_url()\n
......@@ -124,6 +125,7 @@ if document.getValidationState() not in validation_state:\n
# Return the URL\n
if view and portal_type not in html_portal_type_list:\n
return \'%s/%s/view\' % (context.absolute_url(), reference)\n
\n
return "%s/%s" % (context.absolute_url(), reference)\n
</string> </value>
</item>
......
961
\ No newline at end of file
962
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment