[All Adaptavist Apps]

Page tree

where to put custom html into theme builder,
e.g. Google Search or Google Analytics.
I want to put custom html in content and footer section.

If i add it in theme builder content section with

{html}
// my custom html
{html}

it does not appear.

have i overlooked something in the documentation?

best reagards
Thomas

  • No labels

4 Comments

  1. Unknown User (gfraser)

    The html macro is usually disabled by default, however I wouldn't recommend enabling it as it's a big security risk.

    Instead, use the Custom HTML setting in the Confluence Admin Console and add your analytics script to the third text box (the one that outputs its content directly before </body>).

    EDIT: In Builder 2.3.0 and above you can also now set entire panel rendering mode to be HTML if desired (on options tab when editing panel content).

    1. Unknown User (thomas@jprog.de)

      yes thanks,
      for analytics scripts the "official" confluence way (Admin Console/Custom HTML) is a solution, i do that.

      Unfortunately, for Google Search or Google Adwords i found no solution, yet.

      what i try to figure out:

      • use Theme Builder
      • my Layout: Left Sidebar, Title, Content
      • add custom html to Title or Content section

      a) first idea:

      tried to add the Google Adwords script (or any other html, javascript)
      to Title / Content.

      if i go to Theme Builder / Title / Button "Content" add add there

      Unknown macro: {builder-pagetitle} ">
      Unknown macro: {builder-pagetitle}

      Unknown macro: {html}

      // custom html

      the "Content"/"Option" is set to "Wiki Markup"

      -> result: html is not rendered, only pagetitle appears

      b) second idea:

      • add the custom html to Theme Builder / Title
      • "Content"/"Option" is set to "Raw HTML"
        -> great, the HTML is rendered and appears
      • but my Theme Builder "Content" section is not editable (cannot click on button "Content" below;
        so i cannot move builder-pagetitle to "Content" and i have no longer a pagetile in my wiki.

      any ideas ?

      --Thomas

      1. Unknown User (gfraser)

        For other scripts, eg. adsense stuff, I normally create a user macro (in admin console) set to "output html" and body = not ticked.

        That way you can just drop the macro in to any location that needs it, eg. a theme panel or somewhere in a wiki page.

        1. Unknown User (thomas@jprog.de)

          Guy,

          thanks for this hint, confluence user macro is the best way to insert custom html.

          did it, works.

          BR
          --Thomas