Connected Data Solution

RScott
RScott Member Posts: 15

I wanted to know if there's another way to do this. I'm working on a site that will have app download buttons on most pages. I want to be able to update a link in one location, and have all buttons throughout the website reflect the change.

I added the urls to the Business Text section of the content library, and use handlebars to connect the <a href> tags in custom html buttons to that data. I couldn't find a way to do this using the built-in widgets. Is there a better solution? Some buttons will be html buttons with text, others will be Apple and Google Play's standard download buttons. Thanks.

Best Answer

  • RScott
    RScott Member Posts: 15
    Answer ✓

    @Aj_Pfeil Copying the button html into different page layouts while I'm building them is fine. The buttons are only on a few pages, but they appear multiple times. I'm using connected data variables to sync both the link in the <a href> tag and the image src in buttons, so that the entire button can be updated everywhere it's located on the website from the Content Library section. This should work.

Answers

  • Elizabeth_Fedak
    Elizabeth_Fedak Member Posts: 95 MVP

    I believe a custom widget is the best option how you set it up for this one using a string plugged into href. The docs mention this:


  • RScott
    RScott Member Posts: 15

    @Elizabeth_Fedak Thanks, I'll keep using html.

  • Aj_Cre8
    Aj_Cre8 Member Posts: 342 MVP

    If I am hearing you right.

    I believe you can do this without adding any HTML to the database you are using.. Since the buttons will all be the same, you can add the button on the Dynamic Page Design and just don't link it to the database.. Then anytime you need to change it, you can just edit the button link on the Dynamic Page design and it will reflect on all pages..

    No need for a custom widget.. Just put a button on the page, and don't link it to the connected data.

  • RScott
    RScott Member Posts: 15

    @Aj_Pfeil Thanks. The links will be the same throughout the website, but not the buttons. We're using several different buttons that need the same links. Some are html, others are the Google Play and Apple download badges.

    I'm still learning to use Duda, but dynamic pages seems like it's for generating page templates. The buttons are used in different page layouts. Connected data that can be used anywhere in any layout by just adding the variable should work. Once the site is finished, I want the client to be able to easily find the links and update them in one section that's separate from any page design.

  • Aj_Cre8
    Aj_Cre8 Member Posts: 342 MVP

    Okay. I am not sure how you would streamline that then. It seems like it's going to a pretty tedious process.