0

My problem is that I cannot edit the actual HTML code of my page, I can only style it using CSS. I am using Abode Muse for this website, so the HTML files are overwritten every time I publish a change in Muse.

I need to insert this code right before the closing body tag:

{module_contentholder, name="_SliderScripts"}

Can I select the closing tag of an element in CSS? I have been trying the :before and :after tags but just don't know how to select a closing tag.

I am fairly new to CSS and appreciate any help! Sorry if this is a noob question

  • You cannot change the actual html with css in any way. All you can do is using javascript or easily jquery to manipulate the dom elements. – Zafar Feb 11 '14 at 02:46
  • 1
    By “insert code”, do you mean inserting textual content into the document, or inserting something *as code* that should affect something (what?) somehow (how?). And please show *what* you have tried. – Jukka K. Korpela Feb 11 '14 at 08:15

6 Answers6

0

Do you have any access to jQuery or javascript files? Or just the CSS?

The quickest way is to use the jQuery .append() method, which inserts the specified content as the last child of an element. In this case, you'd want to try:

$( "body" ).append( "{module_contentholder, name='_SliderScripts'}" );

More the .append() method here: https://api.jquery.com/append/

cscott
  • 286
  • 2
  • 4
0

try use some css trick

body:after{
content:'{module_contentholder, name="_SliderScripts"}';
}
Ansyori
  • 2,807
  • 3
  • 29
  • 37
0

Building on cscott's answer, you could use jQuery to append the contents of a contentholder to anywhere in the page, but any quote marks inside the contentholder will not be escaped, and will mess up the .append() function.

More reliably, put your content in a new html page† - one not generated by Muse, so it will not be overwritten. Then use jQuery's .get() function to pull that content and insert it into the page.

Here's an example snippet; it would have to go into the Page Properties › Metadata dialog within Muse:

jQuery(document).ready( function() {
    jQuery.get('/your/content.html', function( data ) {
        // Content has been retrieved, now insert it into the page.
        jQuery('body').append( data );
    });
});

Note I'm using jQuery() and not $() - Business Catalyst's built-in scripts cause trouble when trying to use the shorter form.

† Also, ensure that page is explicitly set to not use any template.

Robert K. Bell
  • 9,350
  • 2
  • 35
  • 50
0

I couldn't see an answer here that really provides what you need.

As I understand it - Muse is not letting you add this code in the Muse template before you publish?

A Quick search turned up this library which claims to be able to add the function you need into Muse.

http://www.aidbc.com/muse-widgets Download here: http://www.aidbc.com/muse-widgets/insert-bc-content-holder

Please reply to let others know if this was the solution you needed.

Neido
  • 181
  • 7
0

you can try this widget for adobe muse that let you place the code before closing body tag or after opening body tag. http://creativated.com/free-muse-widgets-themes/free-adobe-muse-widgets/advanced-html-injector-widget-for-adobe-muse/

from creativated.com

creativated
  • 211
  • 3
  • 16
  • Please state in your answer that you work for Creativated; StackOverflow [doesn't like undeclared self-promotion](https://meta.stackoverflow.com/a/265652/1270789). – Ken Y-N Jul 13 '17 at 01:22
0
<!DOCTYPE html>
<html>
<head>
<style>
body::after { 
content:"Copyright 2020";
background-color: black;
color:white;
font-weight: bold;
}
</style>
</head>
<body>
<p>My name is Sudhir</p>
<p>I live in Badlapur</p>
</body>
</html>