2 Sidebars Customisation (Resolved)

Oct 23, 2009 12:33

Hi I've read and tried some stuff here and it is so wonderful to have such an available wealth of knowledge to help. I'm using Expressive (feather base) on my own lj and have made my first custom layer and added a header and even added the two custom text sidebars code too. My problem is and you can see it, it is obvious at my lj - is that the one ( Read more... )

s2:theme layer, sidebar:custom

Leave a comment

Comments 4

av8rmike October 23 2009, 13:13:37 UTC
It's kind of complicated; the layout is set up to have only one distinct custom text box. As you've found, setting it in two places results in the same content repeated. And, it's not possible to add the functions to handle a second one without re-coding the layout layer.

However, what you can do is override the function for the module above or below which you'd like the second custom text box to appear. For instance, since your right-hand text box is above the Links module, you could override the print_module_links() function to print the custom text at the beginning. If you need me to work out the code, let me know.

Reply

ex_iam138 October 23 2009, 13:39:31 UTC
Yes please I need help with CODE.

I'm pretty new to this.

I'll just let you know how I managed the items to be able to see the custom text over on the right. I had to put some as none to hold the place

First item in sidebar Profile

Second item in sidebar Custom Text

Third item in sidebar (none)

Fourth item in sidebar (none)

Fifth item in sidebar Custom Text
(making it fifth alowed it to go over the right.)

Sixth item in sidebar Links

Seventh item in sidebar (none)

Reply

av8rmike October 30 2009, 14:20:40 UTC
First off, I'm so sorry to keep you waiting. Things have gotten really busy the last week. Anyway, here's the S2 code to draw a second custom text box above your Links List. You'll have to disable the custom text in your fifth item. You'll also want to change the highlighted parts to what you want to be in the second text box.

function print_module_links(string title) {
open_module("customtext", "CustomText2", "");
print safe """Second custom text block!""";
close_module();

var Page p = get_page();
var UserLink[] links = $p.linklist;
if (size($links) < 1 or not $*linklist_support) { return ( ... )

Reply

ex_iam138 October 30 2009, 23:00:08 UTC
This is beautiful. Thankyou. It worked.

Reply


Leave a comment

Up