Hi, ive updated the old closed thread here:https://toolset.com/forums/topic/slider-views-not-from-toolset/#post-1165294
could you post the follow up here pls. thank you.
Hi Dee,
Thanks for writing back and I'll be happy to assist.
To get the complete picture, I'll need access to the front-end and admin area of the website.
Can you please share the link to the page where the slider is and also the custom PHP code? This will allow me to troubleshoot the missing link.
I'm going to set your next reply as private so that you can share the login details.
Important note: Although I'll not be making any changes to the website, it is always a good idea to make a complete backup copy of the website, before sharing the access details.
regards
Waqar
could you pls test it with any simple field pls.
i would need some time to create staging site for this troubleshooting purpose. thanks
Hi Dee,
During testing for the inclusion of a dynamic value in the pagination items ( generated through the shortcode [ show_custom_slider_pagination] ), I noticed that it is outside the loop and therefore doesn't have the current slider post's ID.
Sorry I missed this detail earlier. A workaround that doesn't involve a secondary view or extra database queries would be, to use Javascript to populate these lables.
1. You can keep the span tag for the pagination item label empty in the PHP code:
echo '<span class="text text-uppercase"></span>';
2. Since, you can call any field value in the content template (inside the loop), you can print it in a hidden container:
( screenshot: versteckter Link )
<span class="hidden-lable">[wpv-post-title]</span>
For this example, I've used post title but you can use custom fields as well.
3. To hide this lable from showing inside the content template, you can add some custom CSS code:
.hidden-lable {
display: none !important;
}
4. To get the values of these hidden lables and append them into the pagination item's span tag based on index, you can add following script in the view's "JS editor" tab:
jQuery(document).ready(function() {
jQuery.each(jQuery('.hidden-lable'), function(index) {
var value = jQuery(this).text();
jQuery('.carousel-indicators span.text.text-uppercase').eq(index).text(value);
});
});
regards,
Waqar
My issue is resolved now. Thank you!