Copy link to clipboard
Copied
Hello,
I do not if it is possible,but I have a bloc where I put 4 elements from data fusion, in order, text 1, image1 , text 2 and image 2.
When all element are present in my data source everything is center but when I only have text 1 and image 1, elements are offset because of the empty image bloc (image 2).
Do you know how it is possible to keep my text 1 and image 1 perfectly center if I do not have text 2 and image 2 in my data source?
Thank you for your helps
No need scripting here but [if the op uses anchoring] a simplistic Grep find/replace:
Find: ^.{3}\K.$
Replace by: nothing
(^/) The Jedi
Copy link to clipboard
Copied
I sort-of understand what you're asking, but I'm not totally clear. Can you post a screen shot of what you have, and a mock-up of what you would like it to look like?
Copy link to clipboard
Copied
Thank you Migintosh for your answer,
Here is my problem. 1st image offset the center of text 1 and image 1 while there is no text 2 and image 2.
2nd image show the case with 2 texts and 2 images correcly centerred
Thank you for your help
Copy link to clipboard
Copied
That's all possible, but I don't know if it can be done automatically. If the images are anchored in the type, you can set the type to center alignment, but since you mention a data source, I'm thinking you are importing your type and images from that data source through something like Data Merge or similar (I don't know what data fusion is…sorry about that). If you are importing the text and images, you need to have it not create an image frame if there isn't an image, but I don't know how to do that. Maybe it could be fixed with a script, but writing scripts is beyond my skill set. Someone else can probably help you with that, so keep an eye on this post, or make a new one asking for scripting help.
Copy link to clipboard
Copied
Thank you. Yes data fusion is Data Merge ("fusion de donée" in french). Is it hard to script something like that?
Copy link to clipboard
Copied
I've never learned scripting, so I couldn't say how hard it would be. It's probably possible, but I couldn't say whether it would take longer to fix it manually, compared to the time it would take to write the script. There are some very good scripters on the forum, so you should be able to get some information here.
Copy link to clipboard
Copied
No need scripting here but [if the op uses anchoring] a simplistic Grep find/replace:
Find: ^.{3}\K.$
Replace by: nothing
(^/) The Jedi
Copy link to clipboard
Copied
Thank you very much Michel! That will do the trick for the moment.
Best