We have a cloud-hosted product information database where we store all of our product info and images. That database provides product info to our websites and, hopefully, to InDesign via Data Merge. I can't seem to find any resources to help with my problem, though, which is that I'd like to have InDesign somehow interpret basic HTML during the Data Merge process. For instance, if my data contains a reference to a periodical, that should be italicized. In the product info database, it's stored as <i>Magazine Name</i> (for example).
Also, there is a need for bulleted lists. How can Data Merge interpret either <li></li> or separate fields that use InDesign bullets?
It might be possible via datamerge.
You will need to place a placeholder for each data merge field which will look like say
Magazine Name (the first row on the CSV for import.
When you insert that as a Field in InDesign it will look like;
You can apply an Italic style to that so it looks like <<Magazine Name>>
And when you do your Data Merge all the entries for Magazine Name will be italic.
Same for bulleted lists - you will need a header row for the column in the CSV called Bullet List
And insert that to the indesign file would look like
And all entries using Bullet List would have the bullet style.
But you'd need to insert the correct amount of bullet lists into the text for the data merge.
XML might be better for you - but I'm not proficient in that.
You can get plugins for InDesign
you could prepare a template with all the formatting with paragraph styles for the list elements and character styles for the character formatting. After the merge you could use a script to apply the styles and getting rid of the "tags" with some GREP Find/Replace actions.
Read through the scripts Peter Kahrel did for GREP:
There are also scripts there that could help you to construct GREP queries and run them one after another automatically. Also see into Jongware's WhatTheGREP script and the GREP documentation:
( ACP )
Hello Uwe and Eugene.
Thanks for your reply.
I should have been slightly more clear. In our 'references' section those are actual publication references. So the name of the magazine is italicized within a block of text. Also, we sometimes use ingretients such as lactobacillus, which is always listed in italics because of it's latin roots.
I think EasyCatalog might be the best move in that you can set on a column by column level how you want the data handled. It also has a 'basic html interpreter' built into it. But if there is a way to GREP this consistently, that could be interesting.
I'm just updating this thread with my own answer. I have found EasyCatalog to be the best bet for me. The way I can both set entire columns to use either basic or enhanced HTML interpretation sealed the deal. I'm concataniting all of my bullet points in Salsify as a group of bullets, then in InDesign the EasyCatalog field let me apply HTML interpretation to the field. So now if I have either 1 or dozens of bullets, the list always looks correct.
Delighted it's working for you.
Best of luck.