I'm reading an old tutorial on
s2_bloggish on how to add custom modules into your sidebar but when I copy the s2 shown there into my custom theme layer I get the message Compile error: line 181, column 1: Can't set non-existent property 'sidebar_primary'. Does anyone know what the right wording is to convert the s2 over to Dreamwidth?
Code in question:
set sidebar_primary = [
[ "userprofile", "Userpic Title", "0", "1" ],
[ "viewlinks", "Viewlinks Title" ],
[ "customtext" ],
[ "calendar" ],
[ "links", "Links Title" ],
[ "tags", "Tags Title" ],
[ "pagesummary", "Summary Title" ],
[ "syndicate", "Syndicate Title" ],
[ "poweredby", "Poweredby Title" ],
];
ETA: as
ninetydegrees has rightfully pointed out, I linked and am referring in the title and throughout the post to the wrong thing altogether. I probably meant to refer to this: http://s2-bloggish.livejournal.com/4940.html
ETA2, 4-27: solved this by comparing Carrie's code to ninety's, then stared at strings in DW's Cookbook until it just kind of clicked. DW syntax that works is as follows (in which less is more but sometimes more is less, so I just did whatever worked - you can probably vary wildly from the syntax I chose and still succeed if you know what you're doing):
function print_module_customtext() {
var Page p = get_page();
open_module("customtext", $*text_module_customtext, $*text_module_customtext_url);
close_module();
open_module("customtext", $*text_module_customtext, $*text_module_customtext_url);
"""
***put your free text here***
""";
close_module();
open_module("customtext", $*text_module_customtext, $*text_module_customtext_url);
"""
***put your second free text selection here***
""";
close_module();
open_module("customtext", $*text_module_customtext, $*text_module_customtext_url);
"""
***put your third free text selection here; you can rinse and repeat pretty much indefinitely***
""";
close_module();
}
With many thanks to
ninetydegrees as always for being super-helpful (and for having super-helpful links!).
Re: Questions (edited)
Date: 2014-04-27 03:52 am (UTC)Re: Questions (edited)
Date: 2014-04-27 03:54 am (UTC)Re: Questions (edited) - and wiki pages are broken - literally
Date: 2014-04-27 12:43 pm (UTC)print safeor not (or more specifically, I don't know if usingprint safeis what kept the code from printing! and that's still an interesting question, either way) but I wound up just digging into it myself, and found that LJ uses some code we don't use so I replaced theirs with ours, where needed (but LJ uses some code we just don't need) and tookprint safeout altogether (but did not replace it with any form ofprintsince strings print withoutprintbeing called). I'm not running the code 'live' just yet so it's hidden via my CSS for now, but you can see the result of the syntax I chose in my source (I've updated the OP with it, as well).Also, can someone please fix the wiki (check the page I just linked you to)? The page is broken (printing backend code, it looks like) across the entire top half of it.