Hello,
I get in trouble and I would need your advice...
For a product manual, 95% of the information works perfectly with some conditions.
But as each manual is for a project, some parts are dedicated to the project (ex: the picture on the cover page of the manual).
At the beginning, I added a condition for each project, but we get more and more project, and I don't want to create hundreds of conditions (as hundreds of projects), just for one topic...
At the moment, as temporary solution, I have a specific TOC for each project as +/- 10 topics are specific to the project.
But it means hundreds of TOC as well in the futur => not the good solution!
So my idea would be to use a variable (with the project name), and have a dynamic link for my picture as following:
C:\Heremypath\Resources\**VariableWithProjectName**\cover.jpg
With this solution, I create a specific folder for each project, and my cover picture get always the same name…
Do you this this could be a good solution?
If yes, I have no idea how to set up this solution (for the scripting part). Can you give me some ideaas, so I can search for the solution?
Thanks a lot for your help!
Advise on scripting
-
- Sr. Propeller Head
- Posts: 248
- Joined: Thu May 24, 2018 3:11 pm
- Location: Queensland, Australia
Re: Advise on scripting
I've not tried this and this post is from 2014 so the issues reported may no longer apply, but the below post talks about addressing an image using a madcap variable instead of a direct src link.
viewtopic.php?f=75&t=26687
At the time it didn't show properly in the editor but did show in preview and output.
Rob
viewtopic.php?f=75&t=26687
At the time it didn't show properly in the editor but did show in preview and output.
Rob
Re: Advise on scripting
Hi robdocsmith ,
Sorry for my late answer, I was on hollidays...
Thanks a lot for your feedback, and let's try if your post is still working!
Have a nice day!!
Sorry for my late answer, I was on hollidays...
Thanks a lot for your feedback, and let's try if your post is still working!
Have a nice day!!
Re: Advise on scripting
Hi,
I do a quick feedback as it can helps...
It seems the previous solution doesn't work anymore, if I did everythings well:
<p><img src="<MadCap:variable name="SpecificVariables.Couleur"" /></p>
=> error message "The file could not be loaded. '<', the hexa value is not valid...
Thanks a lot anyway, and if someone has a solution, I'm still interrested...
I do a quick feedback as it can helps...
It seems the previous solution doesn't work anymore, if I did everythings well:
<p><img src="<MadCap:variable name="SpecificVariables.Couleur"" /></p>
=> error message "The file could not be loaded. '<', the hexa value is not valid...
Thanks a lot anyway, and if someone has a solution, I'm still interrested...
Re: Advise on scripting
When you use a variable as an attribute, rather than as document text, you need to use the [%=...%] format. You've probably seen this in your TOC as [%=System.LinkedTitle%] when you let it reference the linked topic's title, but you can use the same format to reference a variable as an HTML attribute in topics.