Improved block condition "path:..." by allowing wildchar.

Added weight data to CMS_BLOCK to be able to sort the block lists,
  and thus order the display of blocks.
Set negative weight for various core block, so that they appear first as expected.
The weight can be set and overwritten in cms.ini , by pref  blocks.{block_id}.weight=integer_weight.
This commit is contained in:
2015-10-16 17:22:22 +02:00
parent 788cf3738d
commit 05472abdd7
7 changed files with 91 additions and 8 deletions

View File

@@ -41,6 +41,16 @@ feature -- Element change
blocks.prune_all (b)
end
feature -- Sort
sort
local
cmp: QUICK_SORTER [CMS_BLOCK]
do
create cmp.make (create {COMPARABLE_COMPARATOR [CMS_BLOCK]})
cmp.sort (blocks)
end
note
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"