We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10076
    • 1,024 Posts
    Could you tell here what you modified, I gave it a try, and the links are okay, for every page, but ruined my CSS in the chunks I guess. And I dont have much time today. I would like to update the first post so it is 100% complete.
    Thanks Phil and Kristalin,

    Frank.
      • 10076
      • 1,024 Posts
      Quote from: Kristalin at Apr 09, 2010, 07:59 AM

      Hello Phil,


      great work! Everything with this minimum edit work perfect.
      Thanks!

      Frank, thank you for the work


      Nice, nice...

      This feels stupid, but I can it get it to work with tabs. That is, the static tabs so to say.

      I did the mods on the coda.js and added the plugin.

      Heres what I use:

      The ditto calls, one to get the menu and one for the content:

      <div class="coda-slider-wrapper">
             <div id="coda-nav-[*id*]" class="coda-nav">
             	<ul>
      [!Ditto? &startID=`[*id*]`&tpl=`makemenu`!]
                 </ul>
      <div class="coda-slider preload" id="coda-slider-[*id*]">
      [!Ditto? &startID=`[*id*]`&tpl=`contentTpl`!]
      </div></div>



      the make menu tpl
      <li class="tab[+id+]"><a href="[~[*id*]~]#[+id+]">[+title+]</a></li> 


      And the contentTpl

      <div class="panel"><div class="panel-wrapper"><h2 class="title">[+title+]</h2>[+content+]</div></div>


      In the header I have a chuck starting the js:

      <script type="text/javascript">
      $().ready(function() {
             $('#coda-slider-[*id*]').codaSlider({
                 dynamicArrows: false,
                 dynamicTabs: false
             });
         });
      </script>


      And (check the link http://blog.smashit.it ) on the start page all is fine, however on the second page, there is no reaction on the links created, however the source seems fine and also the URL created seems fine. Any suggestion. All pages are not cached.

      Would like to understand what is going wrong. The above "tutorial" above is fine if one uses dynamic arrows, for tabs however its not finnished,

      thanks, Frank.

        • 20413
        • 2,877 Posts
        @Frank did you install AnchorsAway plugin?

        I have solved many jQuery problems with this snippet: http://setpro.pl/software/self-reference
          @hawproductions | http://mrhaw.com/

          Infograph: MODX Advanced Install in 7 steps:
          http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

          Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
          http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
          • 16702 ☆ A M B ☆
          • 536 Posts
          I have good news!
          Today i make some test and changes in jquery.coda-slider-2.0

          after line 56 add new var like this:
          var myLoc = document.location; 


          // idea is get the URL

          next is in line 133:
          	ul.append('<li class="tab' + (n+1) + '"><a href="#' + (n+1) + '">' + $(this).find(settings.panelTitleSelector).text() + '</a></li>'); 


          change to:
          	ul.append('<li class="tab' + (n+1) + '"><a href="'+myLoc+'#' + (n+1) + '">' + $(this).find(settings.panelTitleSelector).text() + '</a></li>');


          now links in the HTML is like this:
          <a href="http://www.sitename.net/currnetdoc.html#1"></>
          <a href="http://www.sitename.net/currnetdoc.html#2"></>
          etc.

          after which use of the steps from first post smiley
            palma non sine pulvere
            • 10076
            • 1,024 Posts
            Quote from: Kristalin at Apr 10, 2010, 09:10 PM

            I have good news!
            Today i make some test and changes in jquery.coda-slider-2.0

            after line 56 add new var like this:
            var myLoc = document.location; 


            // idea is get the URL

            next is in line 133:
            	ul.append('<li class="tab' + (n+1) + '"><a href="#' + (n+1) + '">' + $(this).find(settings.panelTitleSelector).text() + '</a></li>'); 


            change to:
            	ul.append('<li class="tab' + (n+1) + '"><a href="'+myLoc+'#' + (n+1) + '">' + $(this).find(settings.panelTitleSelector).text() + '</a></li>');


            now links in the HTML is like this:
            <a href="http://www.sitename.net/currnetdoc.html#1"></>
            <a href="http://www.sitename.net/currnetdoc.html#2"></>
            etc.

            after which use of the steps from first post smiley


            Kristaline,

            great work, the demo I created is finnaly running. Updated the chunks etc. No need to change or set any of the chunks. Just install and put in the ref s to the code s , your code. And it works. Great!

            Frank.
              • 10076
              • 1,024 Posts
              Quote from: Frank at Apr 05, 2010, 05:44 PM

              Hi,

              here a simple solution to create a content slider with the very versatile Coda 2.0 Jquery slider created by Niall Doherty, in the link you can find the options available for this script http://www.ndoherty.biz/demos/coda-slider/2.0/..
              Edit: With the help of Kristalin, who modified the original Jquery-codaslider code, and the AnchorsAway plugin by Open Geek we got it running.

              Got it running here, I did not style it sorry:
              http://blog.smashit.it

              Here s how to do it, there is not much to change except the links to the jquery codes and the CSS that needs to be adapted for your needs.
              Probably a good idea to start of with the original CSS file and adapt that.
              Rest of the chunks will find their way. The original CSS, the chunks and the plugin are attached in the zip, together with the modified Codaslider codes.

              • Download the attached modified coda package from the bottom of this post.
                Put a referer to the three jquery codes in your template <head> section. And off course copy the three jquery codes to that place. In my case:
                <script type="text/javascript" src="[(base_url)]assets/js/jquery-1.3.2.min.js"></script>
                <script type="text/javascript" src="[(base_url)]assets/js/jquery.easing.1.3.js"></script>
                <script type="text/javascript" src="[(base_url)]assets/js/jquery.coda-slider-2.0.js"></script>
              • Make sure Ditto is installed
              • Create all the chunks; codaSlider,contentTpl and dittoSlider.
              • Put a call to the codaSlider chunk before the end head tag </head> in you template. Like so: {{codaSlider}} In the codaSlider chunk you can set the options for the behaviour of the slider.
              • Now create a document that is published and shows in menu. It needs to be a container to hold the documents that you want to use as content for that slideshow. These child documents dont need "show in menu" ticked. They need to be published.
              • [li]In this parent document place a call to the dittoSlider chunk. Like so {{dittoSlider}}. You put the same call in every parent document you like to use the slider in.


              That should do it.

              Frank.


                • 19132
                • 199 Posts
                I have this working, but the {{dittoSlider}} chunk is missing a closing div, which breaks my layout.

                Replace
                <div class="coda-slider-wrapper">
                       <div id="coda-nav-[*id*]" class="coda-nav">
                <div class="coda-slider preload" id="coda-slider-[*id*]">
                [!Ditto? &startID=`[*id*]`&tpl=`contentTpl` &orderBy=`menuindex ASC`!]
                </div>
                </div>
                
                
                


                with
                <div class="coda-slider-wrapper">
                       <div id="coda-nav-[*id*]" class="coda-nav">
                <div class="coda-slider preload" id="coda-slider-[*id*]">
                [!Ditto? &startID=`[*id*]`&tpl=`contentTpl` &orderBy=`menuindex ASC`!]
                </div>
                </div>
                </div> <!-- the missing closing div -->
                
                


                Nice work, and thank you Jason for the AnchorsAway plugin.
                  MySQL: 5.0.45
                  PHP: 5.2.6
                  Linux 2.6.9-023stab048.6-enterprise #1
                  cURL enabled
                  PDO enabled
                  FFox Apple 3.6.8
                  Firebug DIS-abled
                  • 10076
                  • 1,024 Posts
                  Okay Peter,

                  good you got it working. Will sort that missing div.
                  Thanks for noticing. Zip is updated.

                  Frank.
                    • 25207
                    • 29 Posts
                    Hi everyone, I tried using this dynamic Jquery content slider. When I preview the resource it displays a "loading..." text and a box which has a "loading" text inside, it doesn’t display the content of my resources, and how can I use the anchorsaway plugin? Is this the reason why it won’t work? I was tasked to do an advertisement webpage which will automatically slide for every 10 seconds. I proposed to use Modx since its FREE, and with a fast interactive forum that always responds when you needed help especially for a noob like me rolleyes Buying a macromedia flash software is pretty much expensive thats why this is the greater alternative grin. I’m very new at Modx and a help from you guys is pretty much appreciated. kudos to the developers of modx and to its community laugh thanks grin
                      • 10076
                      • 1,024 Posts
                      Hi,

                      did you start with the original codaslider CSS?
                      You got this "live" somewehere?

                      PS also if you want to believe Steve Jobs (read here ), you might want to forget about ex-Macromedia, currently Adobe-Flash. And are the CSS/java solutions the way of the future to create sliders.