Soldier and a Poet, but I'm a Dancer at Best (xmirax) wrote in component_help,
Soldier and a Poet, but I'm a Dancer at Best
xmirax
component_help

So in the course of creating a very different looking layout for Component, I ended up needing to edit the print_my_components function. I wanted to place all of the components inside of a div layer instead of a table, and um, yeah. I guess you could also use this as another place to enter in code for extra components, although you'd probably have to take out the logic statements for that. Anyway, I figured out the function, or something close to it, as it compiles & shows up correctly. Figured I'd post it here if anyone wants to tinker with it. Or correct it.:P



function print_my_components(Page p) {
"""
<td valign="top" width="184">
<table cellspacing="0" cellpadding="0" border="0" width="184">
""";
#first position
if ($*first_position=="profile_order") {
if ($*show_profile == true) {
print_profile($p);}
}
if ($*first_position=="calendar_order") {
if ($*show_calendar == true) {
print_calendar($p); }
}
if ($*first_position=="links_order") {
if ($*show_links == true) {
print_links($p);}
}
if ($*first_position=="free_text") {
if ($*show_free_text == true) {
print_free_text($p);}
}
if ($*first_position=="navigation_order") {
if ($*comp_navbar == true) {
print_nav_comp($p);}
}
if ($*first_position=="summary_order") {
if ($*show_summary == true) {
$p->lay_print_summary();}
}

#second position
if ($*second_position=="profile_order") {
if ($*show_profile == true) {
print_profile($p);}
}
if ($*second_position=="calendar_order") {
if ($*show_calendar == true) {
print_calendar($p); }
}
if ($*second_position=="links_order") {
if ($*show_links == true) {
print_links($p);}
}
if ($*second_position=="free_text") {
if ($*show_free_text == true) {
print_free_text($p);}
}
if ($*second_position=="navigation_order") {
if ($*comp_navbar == true) {
print_nav_comp($p);}
}
if ($*second_position=="summary_order") {
if ($*show_summary == true) {
$p->lay_print_summary();}
}

#third position
if ($*third_position=="profile_order") {
if ($*show_profile == true) {
print_profile($p);}
}
if ($*third_position=="calendar_order") {
if ($*show_calendar == true) {
print_calendar($p); }
}
if ($*third_position=="links_order") {
if ($*show_links == true) {
print_links($p);}
}
if ($*third_position=="free_text") {
if ($*show_free_text == true) {
print_free_text($p);}
}
if ($*third_position=="navigation_order") {
if ($*comp_navbar == true) {
print_nav_comp($p);}
}
if ($*third_position=="summary_order") {
if ($*show_summary == true) {
$p->lay_print_summary();}
}

#fourth position
if ($*fourth_position=="profile_order") {
if ($*show_profile == true) {
print_profile($p);}
}
if ($*fourth_position=="calendar_order") {
if ($*show_calendar == true) {
print_calendar($p); }
}
if ($*fourth_position=="links_order") {
if ($*show_links == true) {
print_links($p);}
}
if ($*fourth_position=="free_text") {
if ($*show_free_text == true) {
print_free_text($p);}
}
if ($*fourth_position=="navigation_order") {
if ($*comp_navbar == true) {
print_nav_comp($p);}
}
if ($*fourth_position=="summary_order") {
if ($*show_summary == true) {
$p->lay_print_summary();}
}

#fifth position
if ($*fifth_position=="profile_order") {
if ($*show_profile == true) {
print_profile($p);}
}
if ($*fifth_position=="calendar_order") {
if ($*show_calendar == true) {
print_calendar($p); }
}
if ($*fifth_position=="links_order") {
if ($*show_links == true) {
print_links($p);}
}
if ($*fifth_position=="free_text") {
if ($*show_free_text == true) {
print_free_text($p);}
}
if ($*fifth_position=="navigation_order") {
if ($*comp_navbar == true) {
print_nav_comp($p);}
}
if ($*fifth_position=="summary_order") {
if ($*show_summary == true) {
$p->lay_print_summary();}
}

#sixth position
if ($*sixth_position=="profile_order") {
if ($*show_profile == true) {
print_profile($p);}
}
if ($*sixth_position=="calendar_order") {
if ($*show_calendar == true) {
print_calendar($p); }
}
if ($*sixth_position=="links_order") {
if ($*show_links == true) {
print_links($p);}
}
if ($*sixth_position=="free_text") {
if ($*show_free_text == true) {
print_free_text($p);}
}
if ($*sixth_position=="navigation_order") {
if ($*comp_navbar == true) {
print_nav_comp($p);}
}
if ($*sixth_position=="summary_order") {
if ($*show_summary == true) {
$p->lay_print_summary();}
}
"""</table></td>""";
}
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 2 comments