1. Laetitia BATTESTI
  2. Feature Requests
  3. Friday, 11 June 2021
  4.  Subscribe via email
Hello, thank you for the great job. Within an 'articles by category module' I would like to hide/show the custom fields (product description) when the user click on a "details' button. can easy layouts do that
Accepted Answer Pending Moderation
This could be done with a UIkit toggle or Bootstrap collapse (see https://getuikit.com/docs/toggle or https://getbootstrap.com/docs/3.3/javascript/#collapse).

If you have difficulties let me know and I'll try to assist you
Review EasyLayouts. If you use EasyLayouts please post a rating and a review at the Joomla! Extensions Directory.
https://extensions.joomla.org/extension/easylayouts/
  1. more than a month ago
  2. Feature Requests
  3. # 1
Accepted Answer Pending Moderation
Hello, thank you jor the answer.
As I am displaying an "articles by category blog" the collapse method works fine with a "details" link for the first article but if the same link appears on the other articles, it opens the custom field layouts in the same first article.
I want the same behavior for each article displayed,of course.
I send images EasyLayouts1.png EasyLayouts2.png EasyLayouts3.png
Thank you for your help, best regards
Attachments (3)
  1. more than a month ago
  2. Feature Requests
  3. # 2
Accepted Answer Pending Moderation
You need a unique ID in the layout.

So where you have collapseExample you would need to incorporate an item id in some way. This isn't currently possible in EasyLayouts - I'll take a look as see what is possible.
Review EasyLayouts. If you use EasyLayouts please post a rating and a review at the Joomla! Extensions Directory.
https://extensions.joomla.org/extension/easylayouts/
  1. more than a month ago
  2. Feature Requests
  3. # 3
Accepted Answer Pending Moderation
Ok - not so hard

Edit the file administrator/components/com_easylayouts/output/common/custom_field.php and add these new lines

foreach (array("subform_wrappertop", "subform_wrappertop") as $wrapperfield)
{
$field[$wrapperfield] = str_replace("{ID}", isset($item->id) ? $item->id : "", $field[$wrapperfield]);
}


at line 34 just after


$field["subform_wrappertop"] = str_replace('{FIELDNAME}', $heading, $field["subform_wrappertop"]);
$field["subform_wrapperbottom"] = str_replace('{FIELDNAME}', $heading, $field["subform_wrapperbottom"]);



Then change your wrapper HTML use use


collapseExample{ID}



I'll include this change in the next release of EasyLayouts
Review EasyLayouts. If you use EasyLayouts please post a rating and a review at the Joomla! Extensions Directory.
https://extensions.joomla.org/extension/easylayouts/
  1. more than a month ago
  2. Feature Requests
  3. # 4
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!

If you use EasyLayouts please post a rating and a review at the
Joomla! Extensions Directory.