?

Log in

No account? Create an account

Previous Entry | Next Entry

additional text boxes in side bar

  • Dec. 16th, 2006 at 9:48 AM
so i'm pretty dumb when it comes to html/css etc, [i usually just copy/paste and hope i got it right] and i can't find anything about this that's been solved, so i would like to know how to add more than just the one custom text box to the sidebar and how i can add things like bolded text to the text in those boxes.

Comments

( 7 comments — Leave a comment )
av8rmike
Dec. 17th, 2006 05:35 pm (UTC)
Try the answer in this entry. You'll need to create a custom theme layer, if you don't have one already. I've edited the code for clarity:
function print_module_customtext(string title, string text, string titlelink_url) {
    var Page p = get_page();
    open_module("customtext", $title, $titlelink_url);
    """First custom text box is this stuff here. It has the default custom text title and so on that you've specified
in your GUI interface.
    """;
    print safe $text;
    close_module();
    
    open_module("customtext", "2nd Custom Text Title", $titlelink_url);
    """This is your second custom text box stuff. Notice I've manually input the title for this one.
This will appear below the first one.
    """;
    print safe $text;
    close_module();
}
shes_staggering
Dec. 19th, 2006 04:06 am (UTC)
thanks, i'll try that. hopefully i can figure it out.
av8rmike
Dec. 19th, 2006 04:40 am (UTC)
There's a tutorial here, follow the directions for "creating a custom theme".
sp_jesse
Sep. 18th, 2008 09:05 pm (UTC)
In talking about how to add an extra custom textbox (back in Dec 06), you gave an example of how to do it...does this mean that every time you wish to change that text you will have to compile a new theme layer?

Using the Customize journal page seems to but that text in both boxes without parsing the html.
av8rmike
Sep. 21st, 2008 08:26 pm (UTC)
Yes, if you want two different text boxes, you'll need to re-compile the layer each time. The Customize Journal page (and the layout itself) only supports having one free text box.
orexisbella
Jun. 18th, 2009 05:59 am (UTC)
Is there a way to assign classes or IDs to each extra text box added this way so that I can style them differently using CSS? :)
av8rmike
Jun. 18th, 2009 01:44 pm (UTC)
The easiest way would probably be to do something like this:
function print_module_customtext(string title, string text, string titlelink_url) {
    var Page p = get_page();
    open_module("customtext", $title, $titlelink_url);
    """<div class="firstclassname">First custom text box is this stuff here. It has the default custom text title and so on that you've specified
in your GUI interface.</div>
    """;
    print safe $text;
    close_module();
    
    open_module("customtext", "2nd Custom Text Title", $titlelink_url);
    """<div class="secondclassname">This is your second custom text box stuff. Notice I've manually input the title for this one.
This will appear below the first one.</div>
    """;
    print safe $text;
    close_module();
}
Just replace "first|secondclassname" with whatever you want to call the classes, then use those names in your stylesheet.
( 7 comments — Leave a comment )

Latest Month

March 2016
S M T W T F S
  12345
6789101112
13141516171819
20212223242526
2728293031  

S2 Help Communities

Tags

Powered by LiveJournal.com
Designed by chasethestars