Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

Web Link Buttons with Variable URLs

New Here ,
Apr 15, 2011 Apr 15, 2011

Hey all:

I asked my question earlier in the general InDesign section of the forum, but a helpful user suggested I repost it here as it will take some scripting magic to accomplish:

My work assignment of late has been developing an interactive PDF catalog of our products that my superior can distribute digitally and let potential customers browse without accessing the website.

We have an Excel file that lists all the details of our products - name, description, title, image, category, etc. I have used Data Merge to create this 300 page document rather than hand-copy each product's information to a single page.

Unfortunately I am now stuck - I have designed the catalog in such a way that I have an image that I want to make a button which, if the person wishes to purchase a product, will take them directly the the product page online where he or she can add it to the shopping cart. This is great, but I cannot seem to find a way to make the image button's link a variable as the rest of the page content. Links to each product page are included in the CSV file, but without a variable web link method, I would have to create the unique links individually, which kinda defeats the purpose of using Data Merge anyway.

So my question is this - is there any way to make a URL button (an image) have a web link function that can read from a CSV file and change each page like other imported content? If not, is there another way to automate the individual link process without setting it up on each generated page?

Thanks in advance,

Asher

TOPICS
Scripting
4.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 20, 2011 Apr 20, 2011

If you were using the aformentioned code to check the script label, it would have to go inside the for (i) loop, replacing the "b = p.buttons[0]" line. Though there was a typo because I set t to the button and instead I should have set b to the button.

Yes, a group. If you know that there is only one group on the page, then you don't even have to loop over the groups. Instead you can just use:

t = p.groups[0].textFrames[0];

b = p.groups[0].buttons[0];

Of course, that'll break if there's ever more th

...
Translate
New Here ,
Jul 13, 2024 Jul 13, 2024

HI, were you able to solve for this?
Please guide me if you have. Thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 13, 2024 Jul 13, 2024
LATEST

This discussion is more than 13 years old. Please start a new one.

I'm locking this to avoid any further confusion.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines