For this example let’s assume that:
1. I have a News and Music weblogs. I’d like to have an option to double post from News to Music. Both weblogs have the same fields group.
2. I have a multi drop-down custom field where when publishing something in News I can select to also publish to the Music landing page.
3. On the Music landing page template I’d like to display News entries only if they’ve been selected from the above custom field.
Also, in the same template I need to mix these selected News entries with entries published from the Music weblog in a normal fashion.
I’ve been testing with this, but it doesn’t seem to work with that double conditional in there. Let’s say News weblog_id was 10 and the multi drop-down list custom field was called multi_publish.
{exp:weblog:entries weblog="news|music" disable="categories|member_data|trackbacks|pagination" dynamic="off" orderby="entry_date" sort="desc"}
{if weblog_id == "10" AND multi_publish == "Music"}
<h1><a href="http://{url_title_path=">{title}</a></h1>
{if:else}
<h1><a href="http://{url_title_path=">{title}</a></h1>
{/if}
{/exp:weblog:entries}You can see that I also need to link to different section URL detail templates depending on where the entry was published from originally. The code above should display url_title_path=“news/details” and url_title_path=“music/details”
=======
I know I can also do this (search parameter) and it works when I tested it, but I don’t want to make the same selection in the drop-down when publishing from the Music weblog every time. It would be very redundant.
{exp:weblog:entries weblog="news|music" disable="categories|member_data|trackbacks|pagination" dynamic="off" orderby="entry_date" sort="desc" search:multi_publish="=Music"}
{if weblog_id == "10"}
<h1><a href="http://{url_title_path=">{title}</a></h1>
{if:else}
<h1><a href="http://{url_title_path=">{title}</a></h1>
{/if}
{/exp:weblog:entries}The code above should display url_title_path=“news/details” and url_title_path=“music/details”
Somebody must have done something like it before…
Virtual high-give and kudos if you can help.
😊
-Martin