diff --git a/src/service/response/cms_response.e b/src/service/response/cms_response.e index 0eeaed4..7e11b8a 100644 --- a/src/service/response/cms_response.e +++ b/src/service/response/cms_response.e @@ -1262,7 +1262,11 @@ feature -- Generation if attached user as l_user then page.register_variable (l_user.name, "user") end - page.register_variable (title, "site_title") + if attached title as l_title then + page.register_variable (l_title, "site_title") + else + page.register_variable (site_name, "site_title") + end page.set_is_front (is_front) page.set_is_https (request.is_https) diff --git a/src/theme/smarty_theme/smarty_cms_page_template.e b/src/theme/smarty_theme/smarty_cms_page_template.e index ff056f0..53d9a10 100644 --- a/src/theme/smarty_theme/smarty_cms_page_template.e +++ b/src/theme/smarty_theme/smarty_cms_page_template.e @@ -48,7 +48,11 @@ feature -- Access variables.force (html_encoded (l_title), "head_title") variables.force (html_encoded (l_title), "page_title") else - variables.force ("CMS", "head_title") + if attached variables.item ("site_title") as l_site_title then + variables.force (l_site_title, "head_title") + else + variables.force ("CMS", "head_title") + end variables.force ("", "page_title") end @@ -128,7 +132,7 @@ feature -- Registration end note - copyright: "2011-2014, Jocelyn Fiat, Eiffel Software and others" + copyright: "2011-2016, Jocelyn Fiat, Javier Velilla, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software