Added feed aggregation module.

Redesigned the CMS_BLOCK system,
   - added condition attribute. It can be set via configuration file
     with
     [blocks]
      {blockid}.region={region_name}
      {blockid}.conditions[]=is_front
      {blockid}.conditions[]=path:location-path/foo/bar
   - For backward compatibility, the CMS will check only conditions for block name prefixed by "?".
Improved the configuration library to support list and table properties.
Updated theme for now, to include the feed examples.
Added "cache" classes, to ease caching of html output for instance. (TODO: improve by providing a cache manager).
This commit is contained in:
2015-10-08 13:56:31 +02:00
parent abebd00a4f
commit 463105f29f
32 changed files with 1504 additions and 108 deletions

View File

@@ -138,6 +138,9 @@ feature -- Hook: block
invoke_block (a_response: CMS_RESPONSE)
-- Invoke block hook for response `a_response' in order to get block from modules.
local
bl: READABLE_STRING_8
bl_optional: BOOLEAN
do
if attached subscribers ({CMS_HOOK_BLOCK}) as lst then
across
@@ -147,7 +150,16 @@ feature -- Hook: block
across
h.block_list as blst
loop
h.get_block_view (blst.item, a_response)
bl := blst.item
bl_optional := bl.count > 0 and bl[1] = '?'
if bl_optional then
bl := bl.substring (2, bl.count)
if a_response.is_block_included (bl, False) then
h.get_block_view (bl, a_response)
end
else
h.get_block_view (bl, a_response)
end
end
end
end