Commit c56bf31f authored by Tomáš Peterka's avatar Tomáš Peterka Committed by Romain Courteaud

erp5_web_renderjs_ui: Make WebSite.description and WebSite.keywords available for WebPages

To make basic support for search engines ``description`` and ``keywords``

/reviewed-on !253
parent c33df101
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
<link rel="shortcut icon" href="favicon.ico"> <link rel="shortcut icon" href="favicon.ico">
<title>${application_title}</title> <title>${application_title}</title>
<meta name="description" content="${site_description}">
<meta name="keywords" content="${site_keywords}">
<link rel="stylesheet" href="gadget_erp5_nojqm.css"> <link rel="stylesheet" href="gadget_erp5_nojqm.css">
<script data-renderjs-configuration="application_title" type="text/x-renderjs-configuration">${application_title}</script> <script data-renderjs-configuration="application_title" type="text/x-renderjs-configuration">${application_title}</script>
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>956.14408.38027.58965</string> </value> <value> <string>958.32778.10430.62549</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1482764698.23</float> <float>1491475425.69</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -41,4 +41,6 @@ return default_web_page.WebPage_viewAsWeb(mapping_dict={ ...@@ -41,4 +41,6 @@ return default_web_page.WebPage_viewAsWeb(mapping_dict={
"language_map": json.dumps({tmp['id']: portal.Base_translateString(tmp['title'], lang = tmp['id']) for tmp in portal.Localizer.get_languages_map() if tmp['id'] in available_language_set}), "language_map": json.dumps({tmp['id']: portal.Base_translateString(tmp['title'], lang = tmp['id']) for tmp in portal.Localizer.get_languages_map() if tmp['id'] in available_language_set}),
"default_selected_language": portal.Localizer.get_selected_language(), "default_selected_language": portal.Localizer.get_selected_language(),
"website_url_set": json.dumps(website_url_set), "website_url_set": json.dumps(website_url_set),
"site_description": web_section.getLayoutProperty("description", default=""),
"site_keywords": web_section.getLayoutProperty("subject", default=""),
}) })
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