Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • art3 Friend
    #202500

    As I can have “carousel for images”
    I want the images to rotate and if possible to have thumbnails would be great.

    Thanks !!!


    1. extra-field-front
    TomC Moderator
    #554457

    Are you asking how to integrate a content slider into your site ??

    art3 Friend
    #554461

    Hello TOMC, Do not want a module, I saw it in your documentation Jason JA (JA Jason template configuration)

    What I want is “Extra fields for article” In JA Jason, you can use extra fields for articles: carousel for images:

    URL:
    http://www.joomlart.com/documentation/joomla-templates/ja-jason-template/configuring-ja-jason-template#article-extrafield

    This Documentation on Jason.

    But within the Joomlart JA DEMO Jason, I do not see how it can be done.

    You have 1 image shows:

    Is this possible?
    Can I have a carousel for images that are entered by Article Manager?

    Thanks !!!


    1. extra-field-front
    2. article
    Adam M Moderator
    #554768

    Hi,

    For more detail about extra field, you might want to take a look here.

    The point is you need to add 1 field so you can choose 2 images for 1 article, then enable option “Enable Carousel for image” will automatically group all images to 1 carousel.

    ayeaye Friend
    #881010

    My question is exactly the same as art3’s (see his screenshots above of the docs we’re talking about). I’d like to use the carousel on the portfolio article pages, but I don’t see how adding extra fields for images would do this (as in your answer above Adam M) is there even an ‘image’ extra field type? looking through the code I don’t see anywhere where the ‘jcontent_carousel’ extra field setting actually does anything.

    On the demo site/quickstart, even where jcontent_carousel is 1, they just have a single image.

    Can you look into this again Adam M please? thanks 🙂

    Adam M Moderator
    #881775

    Hi @ayeaye,

    I’m going to check this matter with development team and reply back shortly, please stay tuned.

    ayeaye Friend
    #881814

    Thank you 🙂 I have realised how to add image extra fields now, by using type="media", but still can’t see anywhere that the carousel setting actually does anything in the code, unless I’m missing something! 😉

    Adam M Moderator
    #883352

    Hi @ayeaye,

    Many thanks for your patience, look like this feature is from old version and has been removed due to compatibility matter. We have updated the documentation page to avoid any misunderstanding in the future and please accept our apology for such inconvenient.

    ayeaye Friend
    #887147

    OK, thanks. I needed this so I’ve done it myself. Just sharing here in case anyone else wants to do it.

    This makes the Full article image display as the first slide of the carousel, then the extra field images after. If there are no extra field images it just displays the single full image as normal, no carousel.

    So first I made five additional extra fields (as explained in T3 docs) of ‘type="media"’ I called the jcontent_image1, jcontent_image2 etc.

    Then I made a file where I could use the bootstrap carousel code:
    templatesja_jasonhtmllayoutsjoomlacontentfulltext_image_portfolio_carousel.php

    which looks like this:

    <?php
    /**
     * @package     Joomla.Site
     * @subpackage  Layout
     *
     * @copyright   Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
     * @license     GNU General Public License version 2 or later; see LICENSE.txt
     */
    
    defined('_JEXEC') or die;
    $params  = $displayData['params'];
    $item  = $displayData['item'];
    $images = json_decode($item->images);
    $extrafields = $item->extrafields;
    if (empty($images->image_fulltext)) return ;
    
    $imgfloat = (empty($images->float_fulltext)) ? $params->get('float_fulltext') : $images->float_fulltext;
    ?>
    
        <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
      <!-- Indicators -->
      <ol class="carousel-indicators">
        <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
        <?php if ($extrafields['jcontent_image1']) { ?>
        <li data-target="#carousel-example-generic" data-slide-to="1"></li>
        <?php } 
        if ($extrafields['jcontent_image2']) { ?>
        <li data-target="#carousel-example-generic" data-slide-to="2"></li>
        <?php } 
        if ($extrafields['jcontent_image3']) { ?>
        <li data-target="#carousel-example-generic" data-slide-to="3"></li>
        <?php } 
        if ($extrafields['jcontent_image4']) { ?>
        <li data-target="#carousel-example-generic" data-slide-to="4"></li>
        <?php } 
        if ($extrafields['jcontent_image5']) { ?>
        <li data-target="#carousel-example-generic" data-slide-to="5"></li>
        <?php } ?>
      </ol>
    
      <!-- Wrapper for slides -->
      <div class="carousel-inner" role="listbox">
        <div class="item active">
          <img src="<?php echo htmlspecialchars($images->image_fulltext); ?>" alt="<?php echo htmlspecialchars($images->image_fulltext_alt); ?>">
        </div>
        <?php if ($extrafields['jcontent_image1']) { ?>
        <div class="item">
          <img src="<?php echo htmlspecialchars($extrafields['jcontent_image1']); ?>" alt="...">
        </div>
        <?php } ?>
        <?php if ($extrafields['jcontent_image2']) { ?>
        <div class="item">
          <img src="<?php echo htmlspecialchars($extrafields['jcontent_image2']); ?>" alt="...">
        </div>
        <?php } ?>
        <?php if ($extrafields['jcontent_image3']) { ?>
        <div class="item">
          <img src="<?php echo htmlspecialchars($extrafields['jcontent_image3']); ?>" alt="...">
        </div>
        <?php } ?>
        <?php if ($extrafields['jcontent_image4']) { ?>
        <div class="item">
          <img src="<?php echo htmlspecialchars($extrafields['jcontent_image4']); ?>" alt="...">
        </div>
        <?php } ?>
        <?php if ($extrafields['jcontent_image5']) { ?>
        <div class="item">
          <img src="<?php echo htmlspecialchars($extrafields['jcontent_image5']); ?>" alt="...">
        </div>
        <?php } ?>
      </div>
    
      <!-- Controls -->
      <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
        <span class="sr-only">Previous</span>
      </a>
      <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
        <span class="sr-only">Next</span>
      </a>
    </div>
    

    Then changed the bit where the full article image is shown in templatesja_jasonhtmlcom_contentarticleporfolio.php

    to this:

    <div class="col-md-6 img-full">
                <div class="inner">
            <?php 
            $extraimagesexist = ($extrafields['jcontent_image1'] != '') || ($extrafields['jcontent_image2'] != '') || ($extrafields['jcontent_image3'] != '') || ($extrafields['jcontent_image4'] != '') || ($extrafields['jcontent_image5'] != '');
            if ($extraimagesexist && $params->get('access-view')) { 
                    $this->item->extrafields = $extrafields;
                    echo JLayoutHelper::render('joomla.content.fulltext_image_portfolio_carousel', array('item' => $this->item, 'params' => $params));
            } else { 
                  if ($params->get('access-view')): 
                    echo JLayoutHelper::render('joomla.content.fulltext_image_portfolio', array('item' => $this->item, 'params' => $params));
                  endif;
                 } ?>
                </div>
            </div>
            </div>

    I got rid of the ‘use carousel?’ yes/no extra field as I always want them to display as a carousel if any extra images exist. Hope this helps someone.

    Jen

    Adam M Moderator
    #888173

    Hi @hi @ayeaye,,

    Awesome, I passed your workaround to development team so they can check if we can add your implementation in our next version. If you still have any question, please don’t hesitate to let us know.

    Best regards,

    Adam.

Viewing 10 posts - 1 through 10 (of 10 total)

This topic contains 9 replies, has 4 voices, and was last updated by  Adam M 8 years, 9 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum