Using variables in paths
Posted: Tue Mar 12, 2024 6:27 am
Years ago I remember hearing someone say you could use variables in pathnames, e.g.
c:\FlareProject\[variable]\logofile.png
This way you could keep everything in the topic the same but change an image or something else based on a different folder name as defined in the variable. I need to use some method like this because topic content is mostly the same, but images within those common topics differ from client to client.
You can successfully use variables for hyperlink destinations using the syntax:
<a href="[%=VariableSet.VariableName%]">Text</a>
However, that same syntax does not seem to work for image paths, such as:
<img src="../../../Resources/Images/[%=Agencies.Folder%]/Folder1/Folder2/image.png" />
This results in nothing appearing in the output where the image is supposed to be. The build log shows a missing linked source file with a path:
C:\FlareProject\Content\Resources\Images\\Folder1\Folder2\image.png" /> (where the variable is, nothing appears in the output, thus the "\\"
Any thoughts on how to do this? Thanks!!
c:\FlareProject\[variable]\logofile.png
This way you could keep everything in the topic the same but change an image or something else based on a different folder name as defined in the variable. I need to use some method like this because topic content is mostly the same, but images within those common topics differ from client to client.
You can successfully use variables for hyperlink destinations using the syntax:
<a href="[%=VariableSet.VariableName%]">Text</a>
However, that same syntax does not seem to work for image paths, such as:
<img src="../../../Resources/Images/[%=Agencies.Folder%]/Folder1/Folder2/image.png" />
This results in nothing appearing in the output where the image is supposed to be. The build log shows a missing linked source file with a path:
C:\FlareProject\Content\Resources\Images\\Folder1\Folder2\image.png" /> (where the variable is, nothing appears in the output, thus the "\\"
Any thoughts on how to do this? Thanks!!