Tabs Display Issue
4 posts by 2 authors in: Forums > CMS Builder
Last Post: February 24, 2017 (RSS)
By bryant - February 22, 2017
Hello,
If anyone could please take a look at this it would be very helpful. I've tried to find a way around this but I'm stuck.
I'm using tabs to display different content in. The issue I'm having is not all of the tabs will need to be displayed if there is no content in it or at least the title tab should be removed if that makes sense.
These tabs, in particular, may not get used depending upon the event.
In the PHP file I did not wrap the "title" PHP codes around the "#tab-" yet because I'm not sure if that would help this issue.
<?php echo htmlencode($event_listingsRecord['location_title']) ?>
<?php echo htmlencode($event_listingsRecord['participants_title']) ?>
<?php echo htmlencode($event_listingsRecord['sponsors_title']) ?>
<?php echo htmlencode($event_listingsRecord['gallery_title']) ?>
Attached are screen shots and a PHP file.
Good (event-good.png)
One event has all tabs filled in from cms content
Issue (event-issue.png)
Another event only has the first three tabs filled in because it was not needed for that event
Thanks,
Bryan
By ross - February 22, 2017
Hi Bryan
I had a quick look through your code and nothing is jumping out at me as the issue.
If you like, we can take a much more indepth through consulting. You just need to email through consulting@interactivetools.com and we'll go from there.
Another option is to see if anyone else in the community is able to take a stab at it.
Let me know what you think.
Thanks!
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com
Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/
By bryant - February 24, 2017
Hi Ross,
I was able to correct the issue by adding this if statement around the <li> tags and it removed the tabs when there was no data entered into a field in the CMS Builder.
<?php if ($event_listingsRecord['participants_title']): ?>
<li class="">
<a data-toggle="tab" href="#tab-3" aria-expanded="false">
<?php echo htmlencode($event_listingsRecord['participants_title']) ?></a>
</li>
<?php endif; ?>
Bryan
By ross - February 24, 2017
Hi Bryan
Glad you got that resolved.
Thanks for posting the solution to this as well :).
Let me know any other questions.
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com
Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/