PDA

View Full Version : Calling Content Slider pages with a dynamic name rather than the page number?



AHalsey
11-18-2010, 02:42 PM
1) Script Title: Content Slider

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm

3) Describe problem: I need to call content from an external page where I do not know the order of the content. Currently the script info says it must be linked like so: targetpage.htm?sliderid=pagenumber

where "sliderid" is the ID of the Featured Content instance on the page, and "pagenumber" is an integer for the slide you wish to be shown (1=1st page, 2=2nd etc)

However, instead of the integer can I add in the <div> a specific id such as <div class="contentdiv" id="This-Page-Is"> and then call from the external source like so: targepage.html?sliderid=This-Page-Is rather than the 1=1st page, etc.

Any ideas? Thanks!

ddadmin
11-19-2010, 06:32 AM
Try the below attached .js file. It should let you do something like:


mypage.htm?sliderid=divid

where divid is the ID of the content DIV within the slider you wish to be selected when the page loads, ie:


<div id="slider1" class="sliderwrapper">

<div class="contentdiv">
Content 1 Here. <br />
<p></p><a href="javascript:featuredcontentslider.jumpTo('slider1', 3)">Go to 3rd slide</a></p>
</div>

<div class="contentdiv">
Content 2 Here.
</div>

<div class="contentdiv" id="thirddiv">
Content 3 Here.
</div>

</div>

<div id="paginate-slider1" class="pagination">

</div>