Slider

Discussion in 'Article Script / Article Directory Script' started by Greg, Mar 21, 2016.

  1. Greg

    Greg Super Moderator

  2. Andrew_G.

    Andrew_G. Staff Member

    Hi @Greg ,

    Most likely we'll not implement New Articles block as slider in future versions of the Publishing package.

    Anyway, in order to make any articles (New, Featured, Sponsored, Random, Latest, Popular, Sticky, Related, Most viewed, Most recent, Author) block as slider you need to:
    1) open the ../packages/publishing/templates/common/ folder and copy the block.new-articles.tpl file to the ../templates/YOUR_CURRENT_TEMPLATE/packages/publishing/ folder
    2) open the ../templates/YOUR_CURRENT_TEMPLATE/packages/publishing/block.new-articles.tpl file and add the code to the end of the file:
    Code (Javascript):
    {ia_add_js}
    $(function() {
        $('.new-articles').owlCarousel({
            items:6,
            margin:30,
            smartSpeed:450
        });
    });
    {/ia_add_js}
    where .new-articles can be changed to any class of articles container element; 6 can be changed to any needed number of displayed articles.
    3) open the ../templates/YOUR_CURRENT_TEMPLATE/layout.tpl file and replace the line of code:
    Code (Text):
    {ia_print_js files='_IA_TPL_app' order=999}
    with this line of code:
    Code (Text):
    {ia_print_js files='_IA_TPL_app,_IA_TPL_owl.carousel.min' order=999}
    olairmarcos likes this.
  3. Greg

    Greg Super Moderator

    Thanks Andrew

    Would you suggest to not use it?
  4. Andrew_G.

    Andrew_G. Staff Member

    Greetings @Greg ,
    I recommend you not to use the slider feature for 'New Articles' block as this feature is intended to highlight entries.

    Please use this feature (slider) for Featured / Sponsored / Popular articles and etc. blocks.
  5. wabwirelevis

    wabwirelevis New Member

    Hello i want to have the slider in my site. I have tried the above procedure it aint working. Kindly help ASAP

Share This Page