test

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • yfb01 Friend
    #960076

    Hi,
    I would like to have the same implementation as the one of the ticket: "how can i go to see the full articles from this module?"
    https://www.joomlart.com/forums/topic/how-can-i-set-the-hyperlink-on-intro-text/
    I tried the original proposed code, but it is effectively not sufficient. I can get the "Read more", but would also need:

    • to hide the full text picture
    • to float left the intro image.

    In addition, as my website is multi-lingual, how can adapt the "Read more" depending on the language? (if you tell me how to define a variable there, I can then use the language override) :-).
    Can you please provide the final code as well? (so far I am trying the code on a local MAMP test server, so I don’t have an online account to give you. Let me know if I need to install it on an online server). I enclosed the code I modified here below from line 18 onwards, and that works with the "Read more" appearing when a line is expanded and with all lines closed initially.
    Thanks in advance
    yves

    <div id="ja-accordion<?php echo $module->id?>"    class="ja-accordion ja-accordion<?php echo $module->id?><?php echo $params->get('moduleclass_sfx')?>">
    <?php
    if (!empty($accordionData)) :
    ?>
    <ul class="ja-accordion-containner ja-accordion-containner<?php echo $module->id?>" style="width:<?php echo (intval($params->get('Width')) > 0) ? intval($params->get('Width')) . 'px' : '100%'?>">
        <?php
        foreach ($accordionData as $accordion) :
        ?>
        <li>
            <h3 class="ja-accordion-title ja-accordion-title<?php echo $module->id?>"><?php echo $accordion->title?></h3>
            <div class="ja-accordion-content ja-accordion-content<?php echo $module->id?>"><?php echo $accordion->content?>
            <?php 
                if (!empty($accordion->link)){
            ?>
                <a class="readmore" href="<?php echo $accordion->link; ?> ">Read more</a>
            <?php
                }
            ?>
            </div>   
    
        </li>
        <?php
        endforeach ;
        ?>
    </ul>
    <?php
    endif ;
    ?>
    </div>
    <script type="text/javascript">
        window.addEvent('domready', function(){
            var myAccordion = new Fx.Accordion($('ja-accordion<?php echo $module->id?>'), $$('.ja-accordion-title<?php echo $module->id?>'), $$('.ja-accordion-content<?php echo $module->id?>'), {
                //alwaysHide: true, // thi run not fine with hover event
                display: -1,
                trigger: '<?php echo $params->get("mouseType", 'click')?>',
                duration: <?php echo intval($params->get('duration'))?>,
                transition: <?php echo trim($params->get('effect', 'Fx.Transitions.Elastic.linear'))?>,
                onActive: function(toggler, element){
                    toggler.addClass('active');
                    element.addClass('active');
                },
                onBackground: function(toggler, element){
                    toggler.removeClass('active');
                    element.removeClass('active');
                }
            });
        });
    &lt;/script&gt;
    Saguaros Moderator
    #960116

    Hi

    I attached the file with code edited in that topic here, you can unzip and copy it to the associated path: templates/ja_medicate/html/mod_arrcodion/default.php

    For multilanguage site, I updated the JText: <?php echo JText::_('ACCORDION_READ_MORE'); ?> so you can simply open the language file of template and add the translation for the string: ACCORDION_READ_MORE


    1. default.php_.zip
    yfb01 Friend
    #960128

    Thank you Saguaros for your prompt reply.
    It works fine for the language variable.

    But I still have a problème with the two pictures (the one of the intro summary, which is displayed before the read more; and the one attached in the full text display of the article). see the attached pic.
    Is it possible to display the intro picture with a "float – left" info and to suppress the display of the full text picture?

    Thanks in advance
    yves


    1. ja-accordion-pictures-display
    Saguaros Moderator
    #960265

    You can update the URL of that page here so I will have a look.

    yfb01 Friend
    #960302
    This reply has been marked as private.
    Saguaros Moderator
    #960878

    Could you put the site online? It’s better with a closer look.

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

This topic contains 5 replies, has 2 voices, and was last updated by  Saguaros 8 years, 4 months ago.

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