Adding images to blocks on homepage

Respondida

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 />
    {{/is}}

    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');
    if(value=='/hc/en-us/categories/360003115091-Resource-Center')
    {
    $(this).attr('href', '/hc/en-us/articles/Your_article_title_here');
    }
    });

    1

Por favor, entrar para comentar.

Powered by Zendesk