Login | Sign up | Toll-Free: 1-800-752-0455
 
 

Forum

 
Hi,
I'm wondering if it's possible to publish two articles (not headlines) from different categories on the same page. I suppose I could include headlines via ssi and write the whole article in the summary, but that would not work well with a link to previous articles.

Best

/Michael

Re: [musklick] Publishing two articles from different categories on one page

Hi there,

Can you give me more details about how you'd like this to work? How would you decide which articles would be published?

What I would probably recommend is creating a category index page that includes the full content field, instead of just summaries, but that would depend on how you want the page to work.
Donna

--
support@interactivetools.com

Re: [Donna] Publishing two articles from different categories on one page

Hi Donna, thanks for your reply.
I'm trying to create a page that only shows two articles (the latest). Each one from a different category, the latest match and the next match for a football player. The page has a fixed height so I'm using scroll boxes to contain larger text masses. So the script would probably have to operate in between the scroll box tags. For now the categories are:
NEWS
- LATEST MATCH (Sub category)
- NEXT MATCH (Sub category)

It would be great to link to an archive as well. No linking to the main category NEWS is necessary, nor using headlines and linking to the full article. I just want the full articles. In fact the main category isn't necessary if it would help having just two main categories.

The running page without the script is http://www.marcusberg.com/news.html

An AM page can be seen here http://www.marcusberg.com/artman2/publish/news/HSV-vs-hertha-bsc.shtml This page is just one news article and it only works if the editor can write his news articles in between the scroll box codes which is pasted in the HTML portion, but it's not a really good solution.

I have a feeling this might not be a big problem, but I can't seem to think straight and I'm probably just complicating things with unnecessary work arounds.

Hoping you can help

Best
/Michael

Re: [musklick] Publishing two articles from different categories on one page

Hi Michael,

Ok, in that case a new Article List publish rule with a custom template would work perfectly. In your case, your templates' articleRow templatecell would look something like this:

<!-- template insert : $articleList$ -->

<!-- templatecell : articleRow -->
<h1>$article.title$</h1>
<p>$article.content$</p>
<!-- /templatecell : articleRow -->

You can, of course, modify this to have your look & feel, and add in your own formatting as well, but this would display the title & the full content of the article.

In your publish rule, you'd specify your new template, give it a new filename & placeholder, and under "limit" specify 1-2. In the categories, you can choose to only "include" the categories that you want.

Does something like that sound like it would work for you?
Donna

--
support@interactivetools.com

Re: [Donna] Publishing two articles from different categories on one page

Hi Donna, thanks for your reply.
The template works http://www.marcusberg.com/artman2/publish/news.shtml
and I'm now publishing the 2 latest news. However, my goal is to remove the article title (I know how to do that, I've just left them there for now cause it's easier to see the structure) and publish each of the articles in their separate scrollbox with a static h1 above, like this http://www.marcusberg.com/artman2/publish/news/HSV-vs-hertha-bsc.shtml
So that both articles are visible with their headline and as much text as fits in the scrollbox, now the second article is way down in the scrollbox. I tried putting two article rows, but that's not working.
Is this possible?

Looking forward to your reply
/Michael

Re: [musklick] Publishing two articles from different categories on one page

Hi there,

It looks like this is your scroll code right now:

<h1>LATEST MATCH</h1>
<div class="flexcroll" id="mycustomscroll3">
<h2>HSV wins over Hertha BSC</h2>
<p>In the 40th minute Marcell Jansen scores the match's only goal. A left footed shot from the centre of the box to the centre of the goal.</p>
<p>Marcus Berg did not play because of sickness.</p>
<p>Read more at the <a href="http://www.hsv.de/" target="_blank">HSV official web site</a></p>
</div>

<h1>NEXT MATCH</h1>
<div class="flexcroll" id="mycustomscroll4">
<p>Marcus Berg and his HSV team mates will be up against RSC Anderlecht on Thursday 11th March.</p>
</div>


So, the fact that you have the two different div id's is where you'll run into trouble, because you need repeating code. Is it possible to change those id's to mycustomscroll1 and mycustomscroll2? That way, we could let Article Manager number it, like this:

<!-- template insert : $articleList$ -->

<!-- templatecell : articleRow -->
<!-- templateIf $articlelist.currentresultnumber$ == 1 --><h1>LATEST MATCH</h1><!-- /templateIf -->
<!-- templateIf $articlelist.currentresultnumber$ == 2 --><h1>NEXT MATCH</h1><!-- /templateIf -->

<div class="flexcroll" id="mycustomscroll$articlelist.currentresultnumber$">
<p>$article.content$</p>
</div>
<!-- /templatecell : articleRow -->


Basically, it uses the "$articlelist.currentresultnumber$" placeholder to tell you what the current result number is, which will either be 1 or 2, since there are only two results. So, if you can work the rest of your layout around that, it'll work great. :)

I also used the current result number to ask it whether you should display "latest match" or "next match". Depending on which number it is, it will show only the one that matches.

Give that a try and let me know if it works. :)
Donna

--
support@interactivetools.com

Re: [Donna] Publishing two articles from different categories on one page

Hi Donna, thanks again :-)
it's getting there, but both h1 headlines appear above each section: http://www.marcusberg.com/artman2/publish/news.shtml

It also looks like the second scrollbox is the same height as the first, although it should be much shorter. Thus breaking the layout area.

/Michael

Re: [musklick] Publishing two articles from different categories on one page

Oops, this is what I get for not doublechecking my syntax. The templateIf's should be:

<!-- templateIf : $articlelist.currentresultnumber$ == "1" -->

Try that instead. :)

As for the scrollboxes, I checked your sourcecode and it is giving the two div tags the correct "mycustomscroll2" and "mycustomscroll1" id's. You'll probably want to doublecheck your CSS.
Donna

--
support@interactivetools.com

Re: [Donna] Publishing two articles from different categories on one page

Thanks Donna, it works! [:)]
And you were right about the css, I had uploaded the updated css to the wrong server [;)]
Thank you for your help, your support makes sure that I will choose interactive tools solutions for future projects as well.

Best

/Michael