Need some help and will try to explain as clearly as possible...
I'm redesigning a law site.
I have a template group called "attorneys" for each lawyer profile that has tabs holding various info. Right now, I have individual templates for each profile page that's working fine, but I want to put all the same data into a channel to allow the client to make additions/changes etc.
Moving the data into a channel, I'm using the index of the group which calls the new channel "attorneys" which holds all the data elements. Custom fields are used for each tabs' content with {if} statements to show or hide based on if there's content entered into the individual entries or not.
Simple enough for a standard template/channel combo.
Here's where the tricky part comes in...
The "attorneys" channel has a custom field called {blog_posts_tab}. It's a yes/no radio selection so each entry can have the option to show or hide the "blog posts" tab and its content.
The {blog_posts_tab} is supposed to display the entries written by that specific attorney that's held in a separate channel "news_and_articles".
For example, if you're viewing the 'Karl' attorney entry and click the 'Blog Posts' tab, it will display the title and date of the articles written by only Karl with links to those articles held in a separate channel.
The problem I'm having now is that the "Blog Posts" tab is empty and not pulling any data, only the title and entry of the entry you're viewing.
I've tried using:
{exp:channel:entries channel="attorneys|news_and_articles"}
combined with
{if blog_posts_tab == 'Yes' || channel_short_name == "news_and_articles"}
Here's the partial template code:
{exp:channel:entries channel="attorneys|news_and_articles"}
<!-- ========== BIO DETAIL ========== -->
<div data-equalizer class="row">
<div data-equalizer-watch class="large-6 columns medium-6 large-push-6 end">
<img src="{attorney_portrait}" class="right arrow-mask-left" alt="">
</div>
<div data-equalizer-watch class="large-5 columns medium-6 large-offset-1 large-pull-6">
<div class="vertical-align">
{body}
<h5><a href="tel: 1-{attorney_phone_number}" class="normal">{attorney_phone_number}</a>
{if attorney_phone_extension != ""}, {attorney_phone_extension}{/if}</h5>
<h5><a href="mailto:{attorney_email}" class="normal">{attorney_email}</a>
</h5>
{if v-card != ""}<a href="{v-card}" class="button">V-card</a>{/if}
{if attorney_linkedin_profile != ""}
<h5>
<a href="{attorney_linkedin_profile}" class="normal" target="_blank">
<img src="/img/global/icon-social-square-blue-linkedin.svg" width="18" height="18" alt="">LinkedIn Profile</a>
</h5>{/if}
</div>
</div>
</div>
<br>
<!-- ========== TABS CONTENT ========== -->
<div class="tabs-content">
<div id="tab-1" class="content active">
<div class="large-12 medium-11 columns medium-centered">
{tab-1-content}
</div>
</div>
{if tab-2-content != ""}
<div id="tab-2" class="content">
<div class="large-12 medium-11 columns medium-centered">
{tab-2-content}
</div>
</div>{/if}
{if tab-3-content != ""}
<div id="tab-3" class="content">
<div class="large-12 medium-11 columns medium-centered">
{tab-3-content}
</div>
</div>{/if}
{if tab-4-content != ""}
<div id="tab-4" class="content">
<div class="large-12 medium-11 columns medium-centered">
{tab-4-content}
</div>
</div>{/if}
{if blog_posts_tab == 'Yes' || channel_short_name == "news_and_articles"}
<div id="tab-5" class="content">
<div class="large-12 medium-11 columns medium-centered">
<ul class="no-bullet">
<li>
<h6><a href="{title_permalink}">{title}
<div class="text-serif">
<small>{entry_date format="%l, %F %d, %Y"}</small>
</div></a>
</h6>
<hr>
</li>
</ul>
</div>
</div>
{/if}
{/exp:channel:entries}
Is something like this possible??? Do I need an extra plug-in like Stash?
Here's the template that's working: http://www.krinternetlaw.com/attorneys/karl-kronenberger-profile
And entry that's not working: http://www.krinternetlaw.com/attorneys/karl-kronenberger
Thanks so much!!! Danny