Adding images to blocks on homepage


1 Comentários

  • Jeremy Robinson

    Laura Harvey
     you can mimic the snippet below to your home_page.hbs file. We use this to feed images/icons to our category types, then change where Resource Center is the category name, to whichever category you would like to display an image for and the image asset tag (we set the width to ensure it wasn't oversized since we use svg's). 

    {{#is name 'Resource Center'}}
    <img src="{{asset 'image_name-.svg'}}" width=50px />

    The result should look like this:



    If you want the category to link somewhere else, the below snippet we use in our script.js file, after the document ready function. Just replace the location URL at the end that starts with /hc/.. to your desired page.

    //Resource Center Redirect
    $('a').each(function() {
    var value = $(this).attr('href');
    $(this).attr('href', '/hc/en-us/articles/Your_article_title_here');


Por favor, entrar para comentar.

Powered by Zendesk