Page 1 of 1

Exotic news display

Posted: Sun Aug 02, 2009 5:51 pm
by chris..
Hi there,

it must be so (cmsm)simple, but I can't get it working..

I'd like to display news as following:

category 1
 
  •  
  • news 1.1
     
  • news 1.2
     
category 2
 
  •  
  • news 1.1
     
  • news 1.2
     
In short : a list of categories, with sublist of news links (e.g. $entry->titlelink).

With 'browsecat=1' I can display a clickable category list (but no subnews, just count of them), or with 'summarytemplate' I'm able to display a list of news and their categories (but that's not exactly what I want).

Is there a smarty counter/capture trick to do it, or something else (any way to write the right template) ?

I know we're most of us on holiday, so thanks to those who are reading this post.

Re: Exotic news display

Posted: Sun Aug 02, 2009 5:58 pm
by Dr.CSS
Make new summary template with just the titlelink call in it and call like so...

Category name
{news sumarrytemplate="NewOne" category="category name"}

Re: Exotic news display

Posted: Sun Aug 02, 2009 6:16 pm
by chris..
But that way, the category title is hardcoded in the page template so, if the category is empty, its title will show up.

In fact, I'd like a browsecat without count (like sample one) but with a list of news.

Thanks anyway, Doctor.

Re: Exotic news display

Posted: Sun Aug 02, 2009 6:37 pm
by Dr.CSS
The title of a category will only show up if you put it there, and I would think you won't be putting titles to categories that don't exist or have no content in them...

Re: Exotic news display

Posted: Sun Aug 02, 2009 8:16 pm
by chris..
You're right if I write it in my content tag.
But I was looking for a more automatic way to list non-empty categories and sublist news items (it is for a client who won't write cmsms tags. He can manage news with TinyMCE, but that's all).
I'd like to write {news display='categorylist+newslist'} and showing it in the right column, you know.

As I write, I wonder if CTLModuleMaker is not a good choice to get more control of that (actually, I don't need all news parameters).
I'll check tomorrow.

Thanks again for your time.

Re: Exotic news display

Posted: Wed Aug 12, 2009 6:25 pm
by argraff
If this can be figured out, it would be a HUGE help to me. I've been having the same problem for months. I don't know enough smarty/coding/php to solve it myself.

The categories are often empty on my site due to expiration dates.