add getter to the size of an asset collection in liquid
This commit is contained in:
parent
da51dbc14e
commit
02039159d7
@ -42,6 +42,10 @@ module Locomotive
|
||||
}
|
||||
end
|
||||
|
||||
def size
|
||||
@collection.assets.size
|
||||
end
|
||||
|
||||
def before_method(meth)
|
||||
return '' if @collection.nil?
|
||||
@collection.send(meth)
|
||||
|
Loading…
Reference in New Issue
Block a user