adding slideshow as and element inside feature

If you have questions about using mojoPortal, you can post them here.

You may want to first review our site administration documentation to see if your question is answered there.

This thread is closed to new posts. You must sign in to post in the forums.
11/15/2011 4:07:42 PM
Gravatar
Total Posts 199

adding slideshow as and element inside feature

Is it possible to add a slideshow manually to specific area of an html content feature and not make the entire feature a slideshow??

I have a large html content feature and all I want is the image inside of it to rotate.

11/15/2011 5:33:58 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: adding slideshow as and element inside feature

Everything will rotate, but you could potentially fake it by repeating the same text in each slide. Since it's a large feature, though, that may not be the best idea. You also might try separating the images and text into two separate HTML feature instances.

11/15/2011 10:31:10 PM
Gravatar
Total Posts 355

Re: adding slideshow as and element inside feature

Hello! Here's one way to add rotating content to an HTML instance:

http://blog.arvixe.com/mojoportal-tips-how-to-add-a-front-page-rotator-in-15-minutes/

As you can see in the example, everything that rotates is inside of a div; if you have additional non-rotating content, just put it in a separate div in the appropriate position. Jamie's suggestion of using separate HTML instances is quite valid, unless you have a specific reason for not doing so.

 

 

11/16/2011 7:42:33 AM
Gravatar
Total Posts 199

Re: adding slideshow as and element inside feature

thanks for the info!  I was exploring some options after your post and I came up with this.

Layout.master add this to head: <script src="/Data/Sites/1/skins/Skin_name/js/jquery-cycle.js" type="text/javascript"></script>

<script type="text/javascript">
$('#slideshow-content').cycle({
  fx: 'fade',
  timeout: 5000,
  speed: 1000
}); // end "cycle"
}); // end "ready"
</script>

now anywhere in the html content area add the below and any element will rotate:

<div id="slideshow-content">
<p>1 rotate</p>
<p>2 rotate</p>
<p>3 rotate</p>
<p>4 rotate</p>
</div>

the problem is that when you use the slideshow option for one html content feature and on another html content feature do what I have above it will load cycle twice (once in the head) and (second in the body) and I do not know if that is ok.

11/16/2011 12:03:42 PM
Gravatar
Total Posts 355

Re: adding slideshow as and element inside feature

If you're comfortable with loading it via layout.master, I don't see a need to load it in the html content area. The only thing I see is that by loading it in the layout.master, you don't have the option to change settings for each instance. Depending on your needs, this may not be an issue. I do like the simplicity of your approach, in terms of maintenance by non-developer-types.

11/16/2011 6:42:17 PM
Gravatar
Total Posts 355

Re: adding slideshow as and element inside feature

Oh, one additional thing: instead of using "<script src...", you'll want to use 

<portal:SkinFolderScript ID="sfs99" runat="server" ScriptFileName="jquery-cycle.js" />

11/18/2011 6:37:37 AM
Gravatar
Total Posts 199

Re: adding slideshow as and element inside feature

thanks for the tip - it works great!  Since I wanted to keep my custom js in a folder I altered the file location a bit.

<portal:SkinFolderScript ID="sfs99" runat="server" ScriptFileName="js/jquery-cycle.js" />

I see that it loads the cycle file in the body using this technique not where I actually placed it in the code.

I also did some testing and if I have a html feature enabled for a slideshow and also this new hack I see this in the body

<script src="/Data/Sites/1/skins/Skin_C1/js/jquery-cycle.js" type="text/javascript" ></script>
<script  src="/ClientScript/jqmojo/cycle.js" type="text/javascript" ></script>

Both files are loaded and so far so good no problems.

I really appreciate your input!!

11/18/2011 6:26:01 PM
Gravatar
Total Posts 355

Re: adding slideshow as and element inside feature

I'm not sure if they're the same script or not - that would be something to ask Joe A.  Glad it's working for you - remember to show it off when you're done!

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