Framework CCCS page
This commit is contained in:
parent
09aba964a9
commit
8f812ab935
319 changed files with 24165 additions and 50 deletions
20
lib/menu.rb
Normal file
20
lib/menu.rb
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
def path_section(item, n=1)
|
||||
if (n==1 && item.path=='/') then
|
||||
'main'
|
||||
else
|
||||
sections = item.identifier.split('/')
|
||||
if (n<sections.size)
|
||||
sections[n]
|
||||
else
|
||||
''
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def menu_active_if(ident, n=1, cssclasses='')
|
||||
if (ident==path_section(item, n)) then
|
||||
" class=\"active #{cssclasses}\""
|
||||
else
|
||||
" class=\"#{cssclasses}\""
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue