Page 1 of 1

Number of listed articles on the Category title !!

Posted: Wed 2. Nov 2005, 17:47
by stelios
Hi everybody,

I tried to find a posting to my question but I couldn’t

I am working on a directory and I list the articles in categories using {RELATED:99:keyword}. So far so good.

Now I want on the title of the category to display the number of the listed articles

e.g.

CATEGORY A (10)

Article 1
Article 2
Article 3
......
Article 10

At the moment after adding an article I am changing the number manually. But this is not elegant.

Any ideas please

stelios

Posted: Wed 2. Nov 2005, 18:51
by cwenet
Hi,

please try this:

Edit line 2082 in file:

Code: Select all

\include\inc_front\front.func.inc.php
and change it to:

Code: Select all

return "<h1>".$GLOBALS['row']['article_title']."(".$count.")</h1>".$keyword_links;
Then set the visibility of the category title to false.

Regards
Christoph

Posted: Thu 3. Nov 2005, 11:08
by stelios
Thanks Christoph,

I think you mean line 2028...

Anyway I inserted the code you proposed at line 2028 & set the visibility of the category title to false.

But it fuctiuons partialy.

It shows only one article per category. The rest articles do not appear.

Any idea ??

Thanks / Danke

Greetings from „the Black Forest“

Posted: Thu 3. Nov 2005, 15:28
by cwenet
Hey,

it depends on which version of WCMS do you use.
I have the latest version online. So the code line is 2082. Never mind.

Ok. You have to edit the function get_related_articles by Magnar Stav Johanssen

Please replace this line:

Code: Select all

return $keyword_links; 

I hope, I have understand your problem.
Here it works:
http://test29841.test-account.com/index.php?index

Regards
Christoph

Posted: Thu 3. Nov 2005, 23:31
by stelios
Hi Christoph,

thank you very much for your help.

I found the function get_related_articles by Magnar Stav Johanssen at

Code: Select all

\include\inc_front\front.func.inc.php
and now it fuctions very well, as should be.

Thanks again

Stelios