Linking categories to external urls in the "Copenhagen theme", stopped working

4 댓글

  • Brett - Community Manager
    댓글 작업 고유 링크

    Hey Andreas,

    Could you provide the code you're using to link your Category to an external URL? Additionally, the link you provided doesn't appear to be working for me. Is there another link I should be accessing?

    0
  • Andreas Ribbfors
    댓글 작업 고유 링크

    The code I'm using for that is the following:

    //In the script file
    document.getElementById('cat-360002138560').href = 'https://www.soluno.se/driftinformation';

     

    and in the home_page:

    <a href='{{url}}' class="blocks-item-link" id="cat-{{id}}">

    The link is directed to https://helpcenter.soluno.se/hc/sv

    0
  • Simon Celen
    댓글 작업 고유 링크

    Hi Andreas,

    It seems there's an error in the script.js file of your theme. Near the bottom there is a line commented out that includes a critical Javascript construct:

    /*  $('footer.footer').before('<div class="footer-social"><div>... snip ...</div></div>');
    });
    */

    That last }); is needed for the whole script to function.

    Change it to:

    /* $('footer.footer').before('<div class="footer-social"><div>... snip ...</div></div>');
    */
    });

    ... and things will start working again.

    1
  • Andreas Ribbfors
    댓글 작업 고유 링크

    Lovely, you are terrific! :D

    0

댓글을 남기려면 로그인하세요.

Zendesk 제공