Home
The Toolkit for Online Communities
15265 Community Members, 1 member online, 1887 visitors today
Log In Register

Creating box tags for consistent html/css

OpenACS Home : xowiki : Creating box tags for consistent html/css
Search · Index
Previous Month May 2012
Sun Mon Tue Wed Thu Fri Sat
29 30 1 (1) 2 3 4 (1) 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 (1) 24 25 26
27 28 29 30 31 1 2

Popular tags

ad_form , ADP , ajax , aolserver , asynchronous , bgdelivery , bugtracker , COMET , cvs , debian , emacs , FreeBSD , includelets , install , installation , installers , javascript , libthread , linux , monitoring , nginx , oracle , osx , patches , performance , postgres , pound , redhat , selenium , ssl

No registered users in community xowiki
in last 30 minutes

Contributors

OpenACS.org

No registered users in community xowiki
in last 10 minutes

Creating box tags for consistent html/css

Box tag code:

# The box tag is intended to make the markup around a "box"
# standard sitewide so that you can use the same css everywhere to   
# style the site.

  

template_tag box { chunk params } {

    set class [ns_set iget $params class]

    if {[template::util::is_nil class]} {

        set class box

    }

    set id [ns_set iget $params id]

    if {![template::util::is_nil id]} {

        set id " id=\\\"$id\\\""

    }

    template::adp_append_code "append __adp_output \"<div class=\\\"$class\\\"$id><div class=\\\"boxTop\\\"></div><div class=\\\"boxContent\\\">\""

    template::adp_compile_chunk $chunk

    template::adp_append_code "append __adp_output {</div><div class=\"boxBottom\"></div></div>}"

}