Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Syntax for adding image file ref within Space Tools > Look and Feel > Sidebar, header and footer

Steven Robinson September 3, 2021

I feel really silly asking such a basic question, but I was trying to improve our Confluence page when it comes to referenced header and footer images in the  Space Tools > Look and Feel > Sidebar, header and footer areas.

As it stands, I was able to include an image file that scales when you zoom in or out by using the simplest form;

!image1.png|height=100%,width=100%!

However, with this setup, whenever I create a new page, I must add these files to the new page or else I get an error message that the image doesn't exist.

So, I thought I read that I could refer to an image on a specific page within the same site key using:

!PageName^image1.png|height=100%,width=100%!

However this doesn't seem to be working.

The name of the top level page I would like to use is called "Welcome Screen" which shows in the URL as Welcome+Screen. So, my first inclination was to try using either single or double quotes around the name... but that didn't work.  

I also tried Welcome+Screen as it appears in the URL... no luck there.

I am sure this is just a very basic Syntax problem, but I cannot figure out what I am doing wrong.

All I want to do is have the image files loaded in one place (figuring the top level of the site makes the most sense) and then have all of the header and footer images pointed to that one location so that I don't need to add an image file on every new page that I create. 

Can someone please help me figure out what I am doing wrong?  What is the proper syntax?  Or if there is a better way to achieve the same end goal, I'm all ears! 

1 answer

1 accepted

0 votes
Answer accepted
Alex Koxaras -Relational-
Community Champion
September 6, 2021

Hi @Steven Robinson 

Height and width are supposed to be in pixels and not in percentage. Try this instead:

!PageName^image1.png|height=100!
Steven Robinson September 7, 2021

Thanks for the advice! However, I tried making the suggested change, but it didn't have any effect. 

My image file currently appears just fine as long as a copy of the file is embedded in the page.  So, it does not appear that the use of the percentage is the issue. 

The syntax problem that I am trying to solve is how to  properly reference a file posted on the top level page and have it recognize the image file stored there.

My top level page is titled "Welcome Screen" and no matter what I try, I cannot get it to work that the image file embedded there is found from all subordinate pages.

I still get the following error:

Unable to render embedded object: File (image1.png) not found.

Like vasanth likes this
Alex Koxaras -Relational-
Community Champion
September 8, 2021

Hi @Steven Robinson 

TO my instance the following works as a charm:

 

My overview as a welcome screen with the image inside

welcome01.png

In the tree, it's still named as overview

welcome02.png

 

My settings:

welcome03.png

 

The result

welcome04.png

 

Now, if the above setup yields an error, I would probably try to use another image. Your image could be corrupted or unsupported.

Like Steven Robinson likes this
Steven Robinson September 8, 2021

Well, I'm not sure why it didn't work before, but maybe the fact that I had both a height and a width specified with percentages was part of the problem... Anyhow, the winning syntax was: 

!Welcome Screen^image1.png|width=100%!

 

So, thanks for helping me sort out this syntax nuance!

Steven Robinson September 8, 2021

The part I hadn't been sure of was whether to include the space or not.  So, the answer is yes, include the spaces in the title of the page that you want to use as the reference point within your site.

Alex Koxaras -Relational-
Community Champion
September 8, 2021

Nice!

Kindly mark the answer as correct to help other user in the community to find the right answers.

Cheers!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events