Д-р Полуживаго (poluzhivago) wrote in component_help,
Д-р Полуживаго
poluzhivago
component_help

I apologize in advance if my note will repeat any earlier tips I missed. Recently I see many questions about how to put something (text or graphics) on the top of the page, above LJ title. My solution is pretty simple. If we think about component layout as a table we can put caption on the top of that table. I.e. in my theme layer before TITLE tag I put CAPTION tag and after this tag I put any (well, almost any) HTML I want following by /CAPTION tag. So it appears on the top of my page.
Update: It goes like this:


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>

<br>

<table width="100%" cellspacing="12" cellpadding="0" valign="top">

<CAPTION>

<font color="#e5e5e5" size="4"><i>YOUR TEXT HERE</i> ©</font>  

<img src="http://img.photobucket.com/albums/v143/poluzhivago/userinfo.gif" border="1" bordercolor="f7f7f7" alt="PICTURE1" >

<a href='http://www.livejournal.com/users/poluzhivago'><font color="f7f7f7" size="2"><b><i>YOUR USERNAME</i></b></font></a>

</CAPTION>

<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>

""";

}


Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 7 comments