Forum
Slider Issue
I'm not sure which is the best way to do the following, so any help would be appreciated.
I have a slider that has 2 parts and i want it to be as easy as pos for the cline tot be able to add new items. There's a date slider that controls the made slider... anyway here's the code
<div id="slider">
<ul id="history">
<li><a href="javascript:mD(1)" class="a" id="h1">1991</a></li>
<li><a href="javascript:mD(2)" id="h2">1992</a></li>
</ul>
</div>
<div class="container wrap">
<div class="detail" id="d1">
<div class="history-img">
<img src="image.jpg">
</div>
<div class="history-txt">
<p>Text</p>
</div>
</div>
<div class="detail" id="d2">
<div class="history-img">
<img src="image.jpg">
</div>
<div class="history-txt">
<p>Text</p>
</div>
</div>
</div>
You need two templates.
Your main template will output the detail for each slide.
Create a second template for just the 'history' section.
In your page, use
perch_content_custom()
to output the region with the 'history' template. Then after that output the region as normal.Is there a link you can send me Drew as I have never shared data between templates before.
There is also an item number requirement, can that be share across template
Which part are you unsure of?
If I'm correct... for the main content its business as usual... standard perch
and in that template...
I'm not sure how to pull out the data from this main content, by using perch custom.
???
Right, that's it. You're just displaying the same region using a different template.
Hi Stephen, I've been looking at the initial code you want to achieve and I think this is one way to do it:
Your Main '
history.html
' template:Your custom '
_date.html
' template:And in your page:
Thanks Simon, that works perfectly! I'm really grateful that you found the time to help me out with this issue, I have used perch for over 5 years but I guess generally i don't use its more advanced features.
See it working here: https://www. link removed .com I'll remove the this link in a few hours.
Thanks Again.
Thanks Stephen, that looks really nice! I am glad I was able to help.