Site Management Tools HTML Content Type

The HTML content type lets you place HTML, JavaScript, or other code on the pages of your site. You can use this feature for any code that can reside between the <body></body> tags on the page. You can't use the HTML content type for any code that must go in the <head></head> tags of the page.

Warning:

Don't use document.write() when creating scripts for your site. It causes problems with the page's life cycle and can break your site

Note:

If you use CSS from an external site in your HTML, you might see a quick page flicker while the site loads.

Examples of HTML content type include:

Note:

Any changes including additions, edits, or deletions, must be published before they are available on the site.

Using the Hyperlink Tag in HMTL Code

A hyperlink lets you link to another file or document by clicking a highlighted word or image on the screen. This could include a link to a Word document, PDF, or image. When you use the hyperlink tag in the HTML Content area in Site Management Tools (SMT), you need to add an extra attribute to the CCT code. You need to add target=”_blank” inside the <a> tag.

Here is example:

<a href="/site/images/Test.pdf" download="TEST PDF"><img src="/site/images/test_image.jpg" /></a>

For the link to work correctly, add target”_blank”:

<a href="/site/images/Test.pdf" download="TEST PDF" target="_blank"><img src="/site/images/test_image.jpg" /></a>

Whether the link downloads automatically or opens in a new tab depends on the user's browser settings.

Alternative to document.write()

Don't use document.write() when creating scripts for your site, because it can interfere with the page life cycle and break your site. Instead, create an element and set its innerHTML.

The following depicts an example script:

            <span id='suiteElement'></span>
<script>
   var suiteElement = document.getElementByld('suiteElement');
   if (suiteElement) {
         suiteElement.innerHTML = 'I Love HTML Content!';
   }
</script> 

          

Related Topics

General Notices