Livejournal
Log in
Post
Friends
My journal
thimble_kiss
in
s2flexisquares
Banner on journal page only?
Sep 22, 2009 15:42
I couldn't find anything about this, and I don't know if it's possible to do, but (
Read more...
)
solved
,
header and footer
,
misc
Leave a comment
Comments 5
godofwine
September 22 2009, 14:35:55 UTC
If you want to only have the header on the "Recent Entries" page, add the following to your theme layer:
function Page::lay_print_header()
"Prints header"
{
var Page page = get_page();
var string title = $this->title();
if ($.view == "recent") {
print """
""";
var string website_name = $.journal.website_name ? $.journal.website_name : $*text_website_default_name;
if ($.journal.website_url != ""){
println safe """
$website_name
""";
}
foreach var string v ($.views_order) {
if ($.view == $v) {
"""
"""; println lang_viewname($v) + "
";
} else {
println "
"+lang_viewname($v)+"
";
}
}
print safe """
$title
$.global_subtitle
""";
} else {
return;
}
}
Reply
thimble_kiss
September 22 2009, 15:54:07 UTC
Thank you, that's awesome! The other person who responded gave me css which was quicker to use with this layout, but I've saved the code above for future reference. :)
Reply
anjak_j
September 22 2009, 15:15:01 UTC
If you want to do it using CSS, you could probably use
.lj-view-recent .headerimage { code }
Reply
thimble_kiss
September 22 2009, 15:55:14 UTC
Woot! That was very simple and it worked. :D Thank you so much!
Reply
anjak_j
September 22 2009, 17:41:24 UTC
You're welcome. =)
Reply
Leave a comment
Up
Comments 5
function Page::lay_print_header()
"Prints header"
{
var Page page = get_page();
var string title = $this->title();
if ($.view == "recent") {
print """
""";
- $website_name
""";
- """; println lang_viewname($v) + "
";- "+lang_viewname($v)+"
";
var string website_name = $.journal.website_name ? $.journal.website_name : $*text_website_default_name;
if ($.journal.website_url != ""){
println safe """
}
foreach var string v ($.views_order) {
if ($.view == $v) {
"""
} else {
println "
}
}
print safe """
$title
$.global_subtitle
""";
} else {
return;
}
}
Reply
Reply
.lj-view-recent .headerimage { code }
Reply
Reply
Reply
Leave a comment