Updated CMS code.
Separated code to have a lib and an example. Improved design, fixed a few issues related to folder location. This is still experimental and require more work to be really friendly to use.
This commit is contained in:
47
draft/application/cms/src/handler/theme_cms_execution.e
Normal file
47
draft/application/cms/src/handler/theme_cms_execution.e
Normal file
@@ -0,0 +1,47 @@
|
||||
note
|
||||
description: "[
|
||||
]"
|
||||
|
||||
class
|
||||
THEME_CMS_EXECUTION
|
||||
|
||||
inherit
|
||||
CMS_EXECUTION
|
||||
|
||||
create
|
||||
make
|
||||
|
||||
feature -- Execution
|
||||
|
||||
process
|
||||
-- Computed response message.
|
||||
local
|
||||
-- l_url: READABLE_STRING_8
|
||||
b: STRING_8
|
||||
do
|
||||
set_title ("Home")
|
||||
create b.make_empty
|
||||
|
||||
b.append ("<h1>Home</h1>%N")
|
||||
if attached service.storage.recent_nodes (1, 10) as l_nodes then
|
||||
across
|
||||
l_nodes as c
|
||||
loop
|
||||
b.append ("<div class=%"node-wrapper%">")
|
||||
b.append (c.item.to_html (theme))
|
||||
b.append ("</div>%N")
|
||||
end
|
||||
end
|
||||
|
||||
-- b.append ("<ul>%N")
|
||||
-- l_url := url ("/", Void)
|
||||
-- b.append ("<li><a href=%"" + l_url + "%">Home</a></li>%N")
|
||||
-- l_url := url ("/info/", Void)
|
||||
-- b.append ("<li><a href=%"" + l_url + "%">EWF Info</a></li>%N")
|
||||
|
||||
-- b.append ("</ul>%N")
|
||||
|
||||
set_main_content (b)
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user