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

This forum is for Single-Sourcing your Flare content to multiple outputs.

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

Postby Yaacov on Sat Nov 28, 2015 11:01 pm

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
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

Postby devjoe on Mon Nov 30, 2015 7:36 am

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.
devjoe
Sr. Propeller Head
 
Posts: 316
Joined: Thu Jan 23, 2014 1:43 pm

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

Postby Yaacov on Thu Dec 03, 2015 7:26 am

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
Yaacov
Propeller Head
 
Posts: 31
Joined: Mon Aug 03, 2015 12:42 am


Return to Single-Sourcing

Who is online

Users browsing this forum: No registered users and 1 guest

cron