Number of listed articles on the Category title !!

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
stelios
Posts: 19
Joined: Sun 10. Jul 2005, 18:37
Location: Schopfheim, "The Black Forest" Germany
Contact:

Number of listed articles on the Category title !!

Post 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
cwenet
Posts: 159
Joined: Sat 24. Jul 2004, 10:21
Location: Lake Of Constance, Germany

Post 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
stelios
Posts: 19
Joined: Sun 10. Jul 2005, 18:37
Location: Schopfheim, "The Black Forest" Germany
Contact:

Post 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“
cwenet
Posts: 159
Joined: Sat 24. Jul 2004, 10:21
Location: Lake Of Constance, Germany

Post 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
stelios
Posts: 19
Joined: Sun 10. Jul 2005, 18:37
Location: Schopfheim, "The Black Forest" Germany
Contact:

Post 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
Post Reply