Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dave 48 posts 68 karma points
    Jul 13, 2011 @ 11:26
    Dave
    0

    U4.5.2 Accordion

    Hi

    Probably a simple answer to what seems a simple question but I cannot find anything about the problem.

    Trying to create an accordion just like the ones on http://www.fusioninternetsolutions.com/web-application-development.aspx (Umbraco 3) .

    The new 4.5.2 accordion doesnt seem to like links in it! When I replicate the U3 accordion in U4, I paste into the Item 1 Title - Case studies, and into the Item 1 text an unordered list of 4 links and Save/Publish.

    The result is that everything following the first href= is stripped out and the UL is gone.

    I've tried both single and double quotes (round the link) as thats where the code is stripped from, but nothing makes a difference

    Hopefully someone can help

    Cheers

    Dave

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jul 13, 2011 @ 12:21
    Jan Skovgaard
    0

    Hi Dave

    The accordion functionality has nothing to do with the version of Umbraco you are using. The HTML, CSS and JavaScript are not tied to Umbraco in anyway so there must be something else going wrong somewhere.

    Could you post the snippet of JavaScript that should make the accordion effect? And could you also post the code you are using to generate the lists?

    /Jan

  • Dave 48 posts 68 karma points
    Jul 13, 2011 @ 12:35
    Dave
    0

    Hi Jan

    I understand what you are saying but I am trying to use the Accordion macro (developer/macros/accordion which uses  the developer/xslt/accordion.xslt) which I assumed was a standard macro!

    As it works fine without any links in it I didnt look to hard at the xslt, but upon further investigation, it uses a class accordion which I cant find in any of the style sheets so I'm not too sure how that works!

    Cheers

    Dave

  • Dave 48 posts 68 karma points
    Jul 13, 2011 @ 12:44
    Dave
    0

    Just found the Accordion JS buried in a .js file!

    window.addEvent('domready', function() {
     //create our Accordion instance
     var myAccordion = new Accordion($('accordion'), 'h3.toggler', 'div.element', {
      opacity: false,
      onActive: function(toggler, element){
       toggler.addClass('accopen');
       toggler.removeClass('accclosed');
      },
      onBackground: function(toggler, element){
       toggler.addClass('accclosed');
       toggler.removeClass('accopen');
      }
     });

    Dave

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jul 13, 2011 @ 12:56
    Jan Skovgaard
    0

    Hi Dave

    Nope, accordions are not in the standard macroes in Umbraco :-)

    So I guess you found the missing link now?

    /Jan

  • Dave 48 posts 68 karma points
    Jul 13, 2011 @ 12:57
    Dave
    0

    Hi Jan

    Yes, looks like its some code a previous developer here created.

    Sorry I messed you about!!

     

    Dave

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jul 13, 2011 @ 13:12
    Jan Skovgaard
    0

    Hi Dave

    No worries, we are here to help each other out - and you managed to figure out what was wrong, right? :-)

    Everyone gets a bit confused now and then - especially when the clock is ticking.

    Happy to see you got it sorted.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft