How would I create a variable that is linked to an image?

This forum is for Single-Sourcing your Flare content to multiple outputs.
Post Reply
Yaacov
Propeller Head
Posts: 31
Joined: Mon Aug 03, 2015 12:42 am

How would I create a variable that is linked to an image?

Post by Yaacov »

Using Flare 11.1
I am working on branding my PDF output and I have multiple company logos.
I am trying to work within the existing process as follows:
1. I put each logo in a Resource/image/variable_image folder.
2. I go to each target and add a variable called BrandLogo.

This is where I get stuck. How do I add a link to the relevant logo image in my variable_image folder?
Any help would be appreciated
Yaacov
devjoe
Sr. Propeller Head
Posts: 337
Joined: Thu Jan 23, 2014 1:43 pm

Re: How would I create a variable that is linked to an image

Post by devjoe »

The text of the variable is used directly in the place you reference it. So if you plan to use a variable as the image location, first insert the image (temporarily) directly into the topic. Use the Text editor to look at the source and copy the entire quoted path to the image. If your topics are under other subfolders under Content, then you might get something like ../Resource/image/variable_image/logo1.png
If the topics are multiple levels deep there might be more than one ../
Whatever the path was, copy that into your variable.
You can create the other variable values for the other logos similarly. (I am assuming here that you are already familiar with the process of creating multiple values for a variable and referencing different ones in each target. It sounds like you know this.)

Now remove the temporarily inserted image, and insert the image referencing the variable.
It looks like Flare doesn't support this very well, and you will have to use the Text editor to create the variable reference.
The easiest way to do this is probably to insert one of the images, then in the text editor, change the src attribute of the img tag to mcvariable:Variables.BrandLogo
(this assumes your BrandLogo variable is in the default variable set called Variables which Flare provides; if it's some other variable set then use that in place of Variables).

It also looks like Flare's editor doesn't support this; I am getting a box that says "unsupported media" instead of the image. But it works in the preview and output.
This is probably a bug you should report.
Yaacov
Propeller Head
Posts: 31
Joined: Mon Aug 03, 2015 12:42 am

Re: How would I create a variable that is linked to an image

Post by Yaacov »

Thanx Devjoe.
Your solution works great in the topics, but I am now trying to put the code in a decorative frame in my Title7X9.flpgl file.
When I output the project to PDF, there is no image, just empty space.
Any suggestions?

Thanx in advance
Yaacov
Post Reply