Slideshow in a table in HTML Content feature

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
12/2/2010 7:38:06 AM
Gravatar
Total Posts 39
Hello from France!

Slideshow in a table in HTML Content feature

Hello,

I want to have a slideshow in a table (in HTML Content).

The next lines doesn't work. Why?

<table width="100%">
  <tbody>
    <tr>
      <td>td1
        <div class="myslides">
          <img alt="" width="49" height="58" src="/Data/Sites/1/logos/mojofacethumb.jpg" />
          <img alt="" width="70" height="70" src="/Data/Sites/1/logos/mojoguidetogalaxy.png" />
          <img alt="" width="70" height="70" src="/Data/Sites/1/logos/mojomoonprint.jpg" />
        </div>
      </td>
      <td>td2</td>
      <td>td3</td>
    </tr>
  </tbody>
</table>
Thanks for your help.

(sorry for my bad langage: i'm french!)

 

12/2/2010 9:19:15 AM
Gravatar
Total Posts 2212

Re: Slideshow in a table in HTML Content feature

Hi,

I would never suggest using tables in this way but it should work anyway. I tried it on my own site, using floated divs to mimic a table and I couldn't get it work there either. What I used was this:

<div style="float: left; width: 31%;">
  <div class="myslides">
    <img alt="" height="58" src="/Data/Sites/1/logos/mojofacethumb.jpg" width="49" />
    <img alt="" height="70" src="/Data/Sites/1/logos/mojoguidetogalaxy.png" width="70" />
    <img alt="" height="70" src="/Data/Sites/1/logos/mojomoonprint.jpg" width="70" />
  </div>
</div>
<div style="width: 31%;float: left;">td2</div>
<div style="width: 31%;float: left;">td3</div>
 

I found the cause for it not working to be the way mojo sets up the slideshow. It is expecting the myslides div to be a direct child of the #divContent div.

$('#ctl01_mainContent_ctl00_divContent > div.myslides').cycle({fx:'fade,curtainX,turnUp,slideY,zoom,pinch,scrollRight',speed:1000,timeout:3000,next:'#ctl01_mainContent_ctl00_divContent > div.myslides'});

If this is changed to:

$('#ctl01_mainContent_ctl00_divContent div.myslides').cycle({fx:'fade,curtainX,turnUp,slideY,zoom,pinch,scrollRight',speed:1000,timeout:3000,next:'#ctl01_mainContent_ctl00_divContent div.myslides'});

it should work but Joe A. will have to do that and he may have a reason for setting it up the way it is.

Thanks,
Joe D.

12/2/2010 10:51:58 AM
Gravatar
Total Posts 39
Hello from France!

Re: Slideshow in a table in HTML Content feature

Hi Joe D.

Thanks for the lesson about Div. Now, I will try to use div rather than table.

I tried your method on my test website www.esoft-agency.fr. I created a user you can use to view and edit html code as you want on the page Tests Template/Slideshow :

user: forum@admin.com            pass: forum

Tests avec Div (1): I tried your method, proper positioning of the divs but slideshow does not work.

Tests avec Div (2): Then, I tried your method by putting class"myslides" in the parent div and removing the child div. The slideshow works but I lose the width of 31%

Tests with Div free for forum : a other solution ? ...

Thanks

Christian

12/2/2010 10:55:05 AM
Gravatar
Total Posts 2212

Re: Slideshow in a table in HTML Content feature

Hi Christian,

It's not going to work unless the myslides div is the parent div. I outlined the reason for that in my first post and we'll have to wait for Joe Audette to decide whether or not this should change.

Thanks,
Joe D.

12/2/2010 10:59:37 AM
Gravatar
Total Posts 39
Hello from France!

Re: Slideshow in a table in HTML Content feature

OK

So, we wait Joe Audette

Soon

Christian

12/2/2010 2:22:59 PM
Gravatar
Total Posts 18439

Re: Slideshow in a table in HTML Content feature

I tried your example on my local machine and was able to make a fix in the code so it can work.

The fix is in our source code repository now so it will be fixed in the next release.

Best

Joe

12/3/2010 3:18:56 AM
Gravatar
Total Posts 39
Hello from France!

Re: Slideshow in a table in HTML Content feature

Thank you very much Joe.

I missed this feature, especially for home pages.
I will test with the source code repository and I wait impatiently the new version.
Again thank you and congratulations for mojoPortal.


Christian
 

You must sign in to post in the forums. This thread is closed to new posts.