Tagged: Accordion
-
AuthorPosts
-
yfb01 Friend
yfb01
- Join date:
- July 2008
- Posts:
- 142
- Downloads:
- 55
- Uploads:
- 46
- Thanks:
- 34
- Thanked:
- 7 times in 2 posts
August 15, 2016 at 5:14 am #960076Hi,
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'); } }); }); </script>
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
August 15, 2016 at 7:47 am #960116Hi
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 user says Thank You to Saguaros for this useful post
yfb01 Friendyfb01
- Join date:
- July 2008
- Posts:
- 142
- Downloads:
- 55
- Uploads:
- 46
- Thanks:
- 34
- Thanked:
- 7 times in 2 posts
August 15, 2016 at 8:22 am #960128Thank 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
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
August 16, 2016 at 1:52 am #960265You can update the URL of that page here so I will have a look.
yfb01 Friendyfb01
- Join date:
- July 2008
- Posts:
- 142
- Downloads:
- 55
- Uploads:
- 46
- Thanks:
- 34
- Thanked:
- 7 times in 2 posts
August 16, 2016 at 5:16 am #960302This reply has been marked as private.Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
August 17, 2016 at 4:07 pm #960878Could you put the site online? It’s better with a closer look.
AuthorPostsViewing 6 posts - 1 through 6 (of 6 total)This topic contains 5 replies, has 2 voices, and was last updated by Saguaros 8 years, 2 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum