Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Image Gallery / Content Slider
Els:
If i want to do something like this
Do have i to create this?
1.- image_layout form, video_layout form (as Bloke write for us)
2.-
bq. <txp:if_custom_field name=“folio_content”>
<div id=“loopedSlider”>
<div class=“container”>
<ul class=“slides”>
<txp:upm_image category=’<txp:custom_field name=“folio_content” />’ form=“image_layout” />
<txp:file_download_list catgeory=’<txp:custom_field name=“folio_content” />’ form=“video_layout” />
</ul>
</div>
</div>
</txp:if_custom_field>
and this:
3.-
bq. <txp:variable name=“any_images” value=’<txp:wet_for_each_image category=’‘<txp:custom_field name=“nameofcustomfield” />’‘ />’ limit=“1” />
<txp:variable name=“mt1_images” value=’<txp:wet_for_each_image category=’‘<txp:custom_field name=“nameofcustomfield” />’‘ />’ offset=“1” limit=“1” />
<txp:variable name=“any_videos” value=’<txp:file_download_list category=’‘<txp:custom_field name=“nameofcustomfield” />’‘ limit=“1” />
<txp:variable name=“mt1_videos” value=’<txp:file_download_list category=’‘<txp:custom_field name=“nameofcustomfield” />’‘ offset=“1” limit=“1” />
<txp:if_variable name=“any_images” value=”“>
//no images, check for videos
<txp:if_variable name=“any_videos” value=”“>
// no videos, check for excerpt
<txp:if_excerpt>
// call form_excerpt_only
</txp:if_excerpt>
<txp:else />
<txp:if_variable name=“mt1_videos” value=”“>
// only one video
// call form_single_video
<txp:else />
// more than one video
// call form_video_cat_list
</txp:if_variable>
</txp:if_variable>
<txp:else />
<txp:if_variable name=“mt1_images” value=”“>
// only one image
// call form_single_image
<txp:else />
// more than one image
// call form_slider
</txp:if_variable>
</txp:if_variable>
Ps. what it means mt1_videos?
Thanks
Offline
#26 2010-10-27 21:55:56
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Image Gallery / Content Slider
kuro wrote:
If i want to do something like this
Do have i to create this?
Well, the easiest way would be to get the headlines theme and use the ready-made code ;)
But if all you want to display is the article and its article image, then no, you won’t need most of the stuff posted in this thread. What the original poster wanted to do was to mix different content types, and check if there exists more than one instance of each type.
In this case, it looks like you only need an article or article_custom tag inside the <ul class="slides">...</ul>
.
Ps. what it means mt1_videos?
Hehe, that’s just my idea of using ‘meaningful’ variable names: more than one ;)
Offline