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:
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user