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

4 Comments

  • Brett - Community Manager
    Comment actions Permalink

    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
    Comment actions Permalink

    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
    Comment actions Permalink

    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
    Comment actions Permalink

    Lovely, you are terrific! :D

    0

Please sign in to leave a comment.

Powered by Zendesk