By nkerschgens - March 16, 2009 - edited: March 16, 2009

Hi,

I have 1 article that will be published in 2 categories:

- News
- Calendar

The article pages for these categories are different, but when i use 1 Placeholder Set Name for both article pages, only 1 page is used (news and calendar listing page are linking to the same article).

When i use 2 different Placeholder Set Names for both article page's, only the first selected category (on the article page) is linking correctly to the article, the other i get a URL like: http://mysite.com/.php

How do i fix this? So when i click on the article within the category news i go to the article page defined for News, when i click on the article within the category calendar i get the article page defined for this category...

Re: [nkerschgens] 1 Article, 2 Article pages

Hi there,

What have you got in the index template linking to your article pages? Can you copy & paste the code you've got, and let me know what the two placeholders are?
Donna

--
support@interactivetools.com

Re: [Donna] 1 Article, 2 Article pages

By nkerschgens - March 23, 2009 - edited: March 23, 2009

Hi Donna,

Calendar (Agenda):
<ul class="calendarlist">
<!-- template insert : $articleList$ -->
<!-- templatecell : articleRow -->
<li>
<div class="date">$article.event_start:format(dd-MM-yyyy)$</div><div class="title"> <a href="$published.articleCalendar.url$" title="$article.title$ - lees meer...">$article.title$</a></div><br />
<div class="summary">$article.summary$</div>
</li>
<!-- /templatecell : articleRow -->
</ul>
<!-- templateIf : $articleList$ eq "" -->
<p>Er staan momenteel geen evenementen op onze agenda.</p>
<!-- /templateIf -->


News (Nieuws):
<ul class="newslist">
<!-- template insert : $articleList$ -->
<!-- templatecell : articleRow -->
<?
$expire_date = "$article.expire_date:format(epoch)$";
$current_date = date("U");
if ($current_date < $expire_date) {
?>
<li>
<div class="date">$article.date:format(dd-MM)$</div>
- <a href="$published.articleNews.url$" title="$article.title$ - lees meer...">$article.title$</a><br />
<div class="summary">$article.summary$</div>
</li>
<? } ?>
<!-- /templatecell : articleRow -->
</ul>
<!-- templateIf : $articleList$ eq "" -->
<p>Er zijn momenteel geen nieuwsberichten gepubliceerd.</p>
<!-- /templateIf -->


The 2 placeholders:

$published.articleCalendar.url$
$published.articleNews.url$

Re: [nkerschgens] 1 Article, 2 Article pages

Hi there

Thanks for posting that code. Each publish rule in Article Manager is setup to create one copy of each file it needs to make. This is why you only get one copy of the article when you use the same publish rule and why you get two different files if you use a second publish rule.

I think setting up publish rules specifically for each of your categories is going to be the way to go. If you use the "exclude" option though, you can still have them all using the same publish rule, but they will get published with different templates.

In total, you'll have 4 publish rules:

articleList for each category
articlePage for each category

Does that make sense? Let me know if you need some more detail setting this up.

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/