Skip to main content

The Search for a Better Accordion

  • May 31, 2022
  • 73 replies
  • 2009 views

Show first post

73 replies

gstager
Hero III
Forum|alt.badge.img+8
  • Author
  • Hero III
  • August 8, 2022

@Bfarkas - Yeah, that was the point of having everything in a parent div with the ID  #accord. I only wanted to target objects inside that div. I may not have been unique enough.

I could test the same code and change the ID and make it more quirky to see if that helps but I honestly like the use of the font-awesome chevron better anyways. 


Bfarkas
Hero III
Forum|alt.badge.img+6
  • Hero III
  • August 8, 2022

Yup, accord I wouldn’t consider unique enough cuz people will do similar, I’d start with it, agree with the font awesome as well. Thinking about others coming and adding to platform too in multi-admin environments. 


sigamoline
Helper II
Forum|alt.badge.img+1
  • Helper II
  • August 8, 2022

@gstager The update worked like a charm! Thanks.


gstager
Hero III
Forum|alt.badge.img+8
  • Author
  • Hero III
  • August 8, 2022

The update worked like a charm! Thanks.

Awesome!

Thanks for confirming.


lrodman
Guide II
Forum|alt.badge.img+6
  • Guide II
  • August 8, 2022

@lrodman My hamburger menu looks like that as well.

 

It was something subtle that I didn’t notice for some time. I posted some updated code in a pdf that will take care of that.

Fixed!

 

I was also having the issue that this made all my h2 forced white text, which was undesirable in some widgets.

 

Does this problem persist? Or is it fixed.


gstager
Hero III
Forum|alt.badge.img+8
  • Author
  • Hero III
  • August 9, 2022

I was also having the issue that this made all my h2 forced white text, which was undesirable in some widgets.

Does this problem persist? Or is it fixed.

In my post I described all the updates taken care of in the new code.

It does include the h2 tag

 


lrodman
Guide II
Forum|alt.badge.img+6
  • Guide II
  • August 9, 2022

Fabulous! You’re the best!


  • Novice II
  • September 15, 2022

@gstager : I am trying to add hyperlinks to the text in accordion but I cannot click on it. Is it possible to do the expand/contract just by click on heading or on the drop down button on right?


gstager
Hero III
Forum|alt.badge.img+8
  • Author
  • Hero III
  • September 15, 2022

@hsingh - This request was actually brought up earlier in the thread.

Take a peek at the first page of comments and look for the post from @Allan who had done a little digging into exactly what you are asking for.

 


Scott Foster
Influencer III
Forum|alt.badge.img
  • Influencer III
  • September 26, 2022

I copied and pasted exactly what was provided to test, and it did not work at all? Any suggestions?

 


gstager
Hero III
Forum|alt.badge.img+8
  • Author
  • Hero III
  • September 26, 2022

@Scott Foster - My code assumes placing the CSS in the custom styles area and the HTML in an HTML/WYSIWYG widget for a page.

If you are trying to go with training materials - you would need to put the CSS in the course player area. I have not tried that so I am not 100% sure of the result at this point. 

Looks like you have volunteered to be the guinea pig on that.

Let me know how that plays out.

 


Scott Foster
Influencer III
Forum|alt.badge.img
  • Influencer III
  • October 18, 2022

@Scott Foster - My code assumes placing the CSS in the custom styles area and the HTML in an HTML/WYSIWYG widget for a page.

If you are trying to go with training materials - you would need to put the CSS in the course player area. I have not tried that so I am not 100% sure of the result at this point. 

Looks like you have volunteered to be the guinea pig on that.

Let me know how that plays out.

 

It looks/functions correctly in the Course Description area but in the User view it doesn’t? Any ideas why the difference?

Looks perfect here.

 

But not in the ‘real world’…

 


Scott Foster
Influencer III
Forum|alt.badge.img
  • Influencer III
  • October 18, 2022

Would you be able to re-upload that update PDF? it seems to be expired? THAnk you!!


gstager
Hero III
Forum|alt.badge.img+8
  • Author
  • Hero III
  • October 18, 2022

Would you be able to re-upload that update PDF? it seems to be expired? THAnk you!!

Hmm… I didn’t realize that our uploads expired but here it is.

As for the differences above - I am not sure. It makes me think of areas like certificates or email notifications where it seems rules are a bit different and so not everything works or works as expected.


  • Novice II
  • October 19, 2022

Does anyone know how to add a responsive background image to the accordion?

Thanks 


Scott Foster
Influencer III
Forum|alt.badge.img
  • Influencer III
  • October 19, 2022

Would you be able to re-upload that update PDF? it seems to be expired? THAnk you!!

Hmm… I didn’t realize that our uploads expired but here it is.

 

Thank you! I will review and compare with my existing code. 🤞🏻


Scott Foster
Influencer III
Forum|alt.badge.img
  • Influencer III
  • April 14, 2023

I still can’t get this to work in User View. Has any one else had luck with this?


Annarose.Peterson
Hero III
Forum|alt.badge.img+7

I still can’t get this to work in User View. Has any one else had luck with this?

I finally have an opportunity to use this in our site!  It works BEAUTIFULLY in our sandbox, but in production I can’t get the chevron to appear. 

I have no idea why either.  Both instances have the same exact CSS.  @gstager, have you encountered CSS working perfectly in the sandbox and not in production? You have any recommendations for troubleshooting?


gstager
Hero III
Forum|alt.badge.img+8
  • Author
  • Hero III
  • October 23, 2023

@Annarose.Peterson - Hmm… We don’t have a sandbox to play with so I cannot speak from XP there.

As for the chevron… I think the first place I would look is for any other CSS in production that might be interfering.

Beyond that - it gets a bit more challenging.

Like do we have a missing angle bracket somewhere that is breaking things?

You might copy/paste all the production CSS into VS Code or something and try a search for rules that touch the chevrons.

Maybe try adding some page or widget specific ID/classes to the CSS to isolate it better.

Just some quick rambling thoughts.


Annarose.Peterson
Hero III
Forum|alt.badge.img+7

@Annarose.Peterson - Hmm… We don’t have a sandbox to play with so I cannot speak from XP there.

As for the chevron… I think the first place I would look is for any other CSS in production that might be interfering.

Beyond that - it gets a bit more challenging.

Like do we have a missing angle bracket somewhere that is breaking things?

You might copy/paste all the production CSS into VS Code or something and try a search for rules that touch the chevrons.

Maybe try adding some page or widget specific ID/classes to the CSS to isolate it better.

Just some quick rambling thoughts.

Thank you so much @gstager!  You are a rock star!  Went through all the codes and it looked great and there was nothing else that I could see that would impact the chevron.  It was totally in my HTML code.  I was missing a class. 🤦🏻🤣


Forum|alt.badge.img
  • Novice III
  • February 9, 2024

Thank you so much made my day. @gstager 


  • Novice I
  • May 29, 2024

Hello,

Our team is new to Docebo so we’re just getting familiar with its use.

This accordion code would be of great use for us, since we have a lot of text in our course content.

We placed the CSS code in the “CSS for the HTML training material” area and for the HTML code we pasted it in the Training Material > HTML page but it looks like it stripped out the input tags.

How did everyone else get this to work?


gstager
Hero III
Forum|alt.badge.img+8
  • Author
  • Hero III
  • May 29, 2024

The difference here may be that the original implementation of this was for use within an HTML/WYSIWYG widget rather than the training material area.

It may be that there is another consideration when applying the accordion to that area.


  • Novice I
  • May 29, 2024

Where can we find the HTML/WYSIWYG widget?

In the course widgets, here are the options we have available:

  • Course info
  • Course descript
  • Comments
  • File repository
  • etc.

gstager
Hero III
Forum|alt.badge.img+8
  • Author
  • Hero III
  • May 29, 2024

@annecamh 

They would be outside of a course.

Admin Menu
   > Manage Pages

When you select a page and go to the Composer, you’ll have lots of widgets to choose from when designing your page. The HTML/WYSIWYG widget is one of them.

The CSS would go in the Branding and Look section under custom styles and the HTML would go in the widget on the page.

If the training area is stripping out the input tags - not much can be done about that.