[admin post] Admin Post: Javascript for core1 layouts

Feb. 1st, 2021 03:18 pm
momijizukamori: Green icon with white text - 'I do believe in phosphorylation! I do!' with a string of DNA basepairs on the bottom (Default)
[personal profile] momijizukamori posting in [community profile] style_system
When we made a bunch of changes to how comment pages worked last summer, it had the side effect of breaking Javascript in core1 layouts, because the scripts now need to be loaded at the end of the document rather than in the head. We have a fix for this now, but because core1 layouts typically override all the main functions, it was impossible to apply automatically, and you will have to edit your layouts individually.


1) Open up your custom layers page

2) Look for the layout you want to update - it will be listed as 'Child of layer 1: LiveJournal S2 Core, v1'. Click 'Edit' for the layout you want to update.


3) Find the Page::print() function - you can skim the list of functions quickly in the side bar and click on it to go directly to that function in the editor.


4) Add the line $this->print_script_tags(); right before the closing </body> tag (outside of any quotes surrounding the closing tag), and then click 'Save & Compile'. You should see no errors in the bottom pane.

Profile

Dreamwidth style system discussion

October 2025

S M T W T F S
   1 234
567891011
12131415161718
19202122232425
262728293031 

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 25th, 2026 05:42 pm
Powered by Dreamwidth Studios