Open sonicpunk opened 11 years ago
pixelchutes submitted:
I have run into this issue in the past, and here is a dirty-hack I have used opposed to just creating a snippet:
@[[$chunk:htmlToBottom:mod:replace=0==
]]@
+1 for updating the core to not output the content passed into the [css|js|html]To[Head|Bottom] modifiers.
Here is a similar hack (dirty!) to place raw content into the footer on-the-fly:
@[[+null:default=PLACE ME IN THE FOOTER
:htmlToBottom:mod:replace=0==
]]@
sonicpunk created Redmine issue ID 10145
I attempted to move some html containing javascript links to the bottom of the page like this: [[$insertJs:htmlToBottom]] It worked, the html content was at the bottom of the page, but it also kept the html content where it was at in the document as well. Result was double html content.
http://forums.modx.com/thread/82542/best-way-to-template/?page=2#dis-post-476220
Bob Ray made this comment regarding the issue: Looking at the code, it appears that they would all do that.
I think maybe those cases in the filter() method of core\model\modx\filters\modoutputfilter.class.php should all have a second line: $output = '';
I have not tested on newer versions of MODX.