Simple Question -- Display ARTICLES in Menu?
-
- Posts: 14
- Joined: Wed 30. May 2007, 09:25
Simple Question -- Display ARTICLES in Menu?
Hi everyone,
Is there any SIMPLE replacement tag I can use in a template to produce a list of ARTICLES, like the one I get using the "article menu" contentpart?
I've tried creating an article menu contentpart and then using the {SHOW_CONTENT:CP,[id]} replacement tag -- but that gives me the article menu twice!
I've seen {NAV_LIST_UL} but it seems extremely complicated and I don't know if it shows articles, not just categories. Oliver, if I could make a humble suggestion, perhaps the complexity of NAV_LIST_UL means it could be better implemented as a content part or even a page of its own in the ADMIN section?
Hope someone can help me with this. Thanks,
Daniel
Is there any SIMPLE replacement tag I can use in a template to produce a list of ARTICLES, like the one I get using the "article menu" contentpart?
I've tried creating an article menu contentpart and then using the {SHOW_CONTENT:CP,[id]} replacement tag -- but that gives me the article menu twice!
I've seen {NAV_LIST_UL} but it seems extremely complicated and I don't know if it shows articles, not just categories. Oliver, if I could make a humble suggestion, perhaps the complexity of NAV_LIST_UL means it could be better implemented as a content part or even a page of its own in the ADMIN section?
Hope someone can help me with this. Thanks,
Daniel
- Oliver Georgi
- Site Admin
- Posts: 9928
- Joined: Fri 3. Oct 2003, 22:22
- Location: Dessau-Roßlau
- Contact:
-
- Posts: 14
- Joined: Wed 30. May 2007, 09:25
I'm starting to find this extremely frustrating, because it's not simple at all.
To start with, it seems I need to edit core files to add code to handle the {NAV_LIST_UL} replacement tag. For me, that immediately rules it out.
Let me explain why. I'm a hardcore PHPWCMS evangelist -- I've done over 15 installations, mostly for non-profit community organisations. Although I have the skills to make custom hacks to core files, I don't have time to re-do the hack every time I reinstall PHPWCMS on all my sites to bring their installations up to date with the latest release.
Secondly, I don't have time to dig through multiple threads and posts in this support forum, trying to find out how something works. The {NAV_LIST_UL} reptag has many many parameters and requires a mountain of CSS code, when all I want is a reptag that provides "article menu" functionality.
Here's the site I'm working on:
http://daniel.reeders.net.au/clients/ca ... /index.php
Each of the main categories -- HIV/AIDS, Sexual Health and Hep C -- has a template of its own; eventually they'll have different colours and imagery in the background and banner. In each category there's a range of articles (pages) about different topics. I don't need blog functionality (ie show the top 10 articles by date). I just need a rep tag I can put in each template to say "show me links to all the articles from this category".
Does that make sense?
To start with, it seems I need to edit core files to add code to handle the {NAV_LIST_UL} replacement tag. For me, that immediately rules it out.
Let me explain why. I'm a hardcore PHPWCMS evangelist -- I've done over 15 installations, mostly for non-profit community organisations. Although I have the skills to make custom hacks to core files, I don't have time to re-do the hack every time I reinstall PHPWCMS on all my sites to bring their installations up to date with the latest release.
Secondly, I don't have time to dig through multiple threads and posts in this support forum, trying to find out how something works. The {NAV_LIST_UL} reptag has many many parameters and requires a mountain of CSS code, when all I want is a reptag that provides "article menu" functionality.
Here's the site I'm working on:
http://daniel.reeders.net.au/clients/ca ... /index.php
Each of the main categories -- HIV/AIDS, Sexual Health and Hep C -- has a template of its own; eventually they'll have different colours and imagery in the background and banner. In each category there's a range of articles (pages) about different topics. I don't need blog functionality (ie show the top 10 articles by date). I just need a rep tag I can put in each template to say "show me links to all the articles from this category".
Does that make sense?
-
- Posts: 14
- Joined: Wed 30. May 2007, 09:25
Thanks for the response, but {NAV_LIST_UL} doesn't show ARTICLES. It only shows CATEGORIES.DeXXus wrote:http://www.phpwcms.de/forum/viewtopic.php?t=12633
I need a reptag to show ARTICLES in the same category as the current article.
- Oliver Georgi
- Site Admin
- Posts: 9928
- Joined: Fri 3. Oct 2003, 22:22
- Location: Dessau-Roßlau
- Contact:
-
- Posts: 14
- Joined: Wed 30. May 2007, 09:25
Well, I gave {TEASER_EX} a try.Oliver Georgi wrote:- read - content part teaser is doing this very well!!!
I spent 5 mins searching through the forum to find the 'home post' for the reptag, which is: http://www.phpwcms.de/forum/viewtopic.php?t=7503.
I downloaded the extension from http://www.kmedv.at/wcms/index.php?download and copied it into phpwcms_template\inc_script\frontend_render. That's not difficult, but I now have to track updates and security notices on teaser_ex...
I used the Teaser_Ex Generator from the same site to produce a reptag I could use in my templates. It produced a list of article links in the format of <h1>HEADLINES</h1> -- not exactly what I want in a menu!
So I created a custom articlemenu.tmpl file in /inc_cntpart/articlesummary/list/ and now I'm waiting on Erich_K4 to provide a bugfix, because it applies my custom template to all articles except the first one in the list, which remains in <h1> format.
I'm writing this all out in full because there's no single page anywhere that explains all the different steps you have to take, just to get an article menu.
For all I know someone else has solved the custom template problem before, but I can't wade through 25 pages of responses to Erich's {TEASER_EX} homepost to find out.
This is what I mean when I say it's complicated and frustrating trying to find solutions to simple questions and problems with PHPWCMS.
- Oliver Georgi
- Site Admin
- Posts: 9928
- Joined: Fri 3. Oct 2003, 22:22
- Location: Dessau-Roßlau
- Contact:
NONONO!!! No TEASER_EX - this is not usable for you or recommend!
Content part "Teaser"!!! Read what I write, sorry! So difficult?
Oliver
Content part "Teaser"!!! Read what I write, sorry! So difficult?
Oliver
Last edited by Oliver Georgi on Wed 30. May 2007, 15:55, edited 3 times in total.
-
- Posts: 14
- Joined: Wed 30. May 2007, 09:25
And I wrote REPLACEMENT TAG not CONTENT PART in my request!!!Oliver Georgi wrote:NONONO!!! No TEASER_EX - this is not usable for you or recommend!
Content part "Teaser"!!! Read what I write, sorry! So difficult?
If I wanted a content part I'd use Article Menu, because it selects all articles from the current menu level. Teaser requires me to create a content part in every category, select all its pages by hand, and manually update each content part every time I add a new page to its category.
- Oliver Georgi
- Site Admin
- Posts: 9928
- Joined: Fri 3. Oct 2003, 22:22
- Location: Dessau-Roßlau
- Contact:
-
- Posts: 14
- Joined: Wed 30. May 2007, 09:25
Easy? Repeat: Teaser requires me to create a content part in every category, select all its pages by hand, and manually update each content part every time I add a new page to its category.Oliver Georgi wrote:Content part to define it in an easy way!
I'm trying to set up an article MENU here, a navigation device that focuses on articles instead of categories. Whether CP or CP+RT or Teaser_Ex, none of those solution is going to highlight the currently-selected article, and none is going to pay attention to the ordering I select in the Article Centre.
Oliver, we're not getting anywhere here. If I write code for {NAV_ARTICLE_LIST} and {NAV_ARTICLE_TABLE} reptags, would you be willing to look over the code and consider including it in the core? It seems odd that you're so set against the idea of including articles in menus...
Hi danielreeders,
Afterwards place [x]
So, it's that easy.
Have a look:
[x]
all items in the left and right column need only ONE STEP editing...
set up [x]danielreeders wrote:...Easy? Repeat: Teaser requires me to create a content part in every category, select all its pages by hand, and manually update each content part every time I add a new page to its category....
Afterwards place [x]
So, it's that easy.
Have a look:
[x]
all items in the left and right column need only ONE STEP editing...
Last edited by Jensensen on Fri 19. Sep 2008, 20:42, edited 2 times in total.
- Oliver Georgi
- Site Admin
- Posts: 9928
- Joined: Fri 3. Oct 2003, 22:22
- Location: Dessau-Roßlau
- Contact:
-
- Posts: 14
- Joined: Wed 30. May 2007, 09:25
LISTEN UP! Guys, I know HOW to do the Teaser/Show_Content combination.Jensensen wrote:Hi danielreeders,
set up CP Article Menu and/or Teaser only ONCE!
Afterwards place {SHOW_CONTENT:CP,ID} anywhere on your --> PAGE TEMPLATE
But I need a solution that will populate the menu with links AUTOMATICALLY.
Unlike many users here, I'm not using PHPWCMS for my own site, where it would be reasonable to code every menu by hand. I'm using PHPWCMS to enable staff at community organisations to manage content on their websites long after I'm no longer involved as the web designer.
That's why I need a solution that works AUTOMATICALLY. Teaser does not! You have to manually select which pages to feature in it!

The Article Menu CP almost does that, but rather than highlighting the link to article you're currently viewing, it doesn't show it at all in the list.
Oliver, if I made you a screenshot, it would show the frontend with an article menu with the current article shown and highlighted. The article menu would be produced by a single RT in the template, and the RT code would find out the catid for the current article and get all visible, public articles from that category. It would use UL rather than <TD> and apply a different class to the link for the current article.[/i]