# /www/master-default.tcl
#
# Set basic attributes and provide the logical defaults for variables that
# aren't provided by the slave page.
#
# Author: Kevin Scaldeferri (kevin@arsdigita.com)
# Creation Date: 14 Sept 2000
# $Id: passion.tcl,v 1.1.1.1 2006/03/10 10:25:11 cvs Exp $
#

# fall back on defaults
ad_page_contract {

    Passion Theme
    
    @author SriHarsha Chintalapani(sriharsha.ch@azri.biz)
    @cvs-id $Id: passion.tcl,v 1.1.1.1 2006/03/10 10:25:11 cvs Exp $
} {
    {search_p:optional}
    {help_p:optional}
} 


if { [template::util::is_nil subnavbar_link] } {
    set subnavbar_link ""
}

set skin_css [list "/skin/passion/css/passion.css"]
set package_id [ad_conn package_id]
if { ![exists_and_not_null help_p] } {
set help_p ""
}
if { $help_p == "on" } {
    set helpon [parameter::set_value -parameter help_p -value off]
} elseif { $help_p == "off" } {
    set helpon [parameter::set_value -parameter help_p -value on]
}

set package_key [apm_package_key_from_id $package_id]
#get the user_id
set user_id [ad_get_user_id]

#Context Bar
 if { [info exists context] } {

     lappend context_tmp $context
     unset context
 } else {
     set context_tmp {}
 }


ad_context_bar_multirow  -- $context_tmp


if { ![info exists active_section] } {
switch -exact -- $package_key {
    aiesec-directory { set active_section 2 }
    photo-album { set active_section 3 }
    edit-this-page { set active_section 5}
    default { set active_section 1 }
}
}
 if { [template::util::is_nil title] } {
    set title [ad_conn instance_name]
}

if {[exists_and_not_null navigation_second]} {
 foreach naventry $navigation_second {
	  set navtext [lindex $naventry 0]
	  set navlink [lindex $naventry 1]
          append navhref "<a href=\"$navlink\">$navtext</a>&nbsp;|&nbsp;"

 }

}

if {[exists_and_not_null navigation_third]} {
 foreach nav3entry $navigation_third {
	  set nav3text [lindex $nav3entry 0]
	  set nav3link [lindex $nav3entry 1]
          append nav3href "<li><a href=\"$nav3link\">$nav3text</a></li>"

 }

}
