peaberry (ex_newfangl) wrote in component_help,
peaberry
ex_newfangl
component_help

Help! I've been trying to add more components to my layout but to no avail. I've already read and tried the tutorial on Additonal Components but it does not seem to work. My code just looks so much more different from the others.



function page_layout(Page p) {
var string title = $p->title();
"""
<html>
<head>
<link rel="stylesheet" href="$p.stylesheet_url" type="text/css"/>
$p.head_content
"""; $p->print_custom_head(); """
<title>$title</title>
</head>
<body>
<div>

</div>
<table width="647" cellspacing="0" cellpadding="0" valign="top" align=center>
<tr valign="top" width="100%">
<td width="3">
<img src="http://www.livejournal.com/palimg/component/clear.gif" width="3" height="1" alt="" border="0">
</td>
""";
if ($*comp_state == "left") {
print_my_components($p);
"""
<td width="3">
<img src="http://www.livejournal.com/palimg/component/clear.gif" width="3" height="1" alt="" border="0">
</td>
""";
}
print_my_entries($p, $title);
if ($*comp_state == "right") {
"""
<td width="3">
<img src="http://www.livejournal.com/palimg/component/clear.gif" width="3" height="1" alt="" border="0">
</td>
""";
print_my_components($p);
}
"""
<td width="3">
<img src="http://www.livejournal.com/palimg/component/clear.gif" width="3" height="1" alt="" border="0">
</td>
</tr>
</table>

</body>
</html>
""";
}

That is the code I'm using and everything's perfect over at http://newfangled.livejournal.com/, but now I wish to add new components and it won't show! Just where do I insert this:

function print_free_text(Page p) {

print_comp_header($*free_text_text);
"""$*free_text""";
print_comp_footer();

print_comp_header("Working");
"""Testing testing</p>""";
print_comp_footer();

}

That's the code found at the Additonal Component tutorial. Am thoroughly confused. Someone please help!
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 5 comments