Simple Question -- Display ARTICLES in Menu?

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
danielreeders
Posts: 14
Joined: Wed 30. May 2007, 09:25

Simple Question -- Display ARTICLES in Menu?

Post by danielreeders »

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
User avatar
Oliver Georgi
Site Admin
Posts: 9928
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau-Roßlau
Contact:

Post by Oliver Georgi »

{NAV_LIST_UL} is very simple - content part will not help! It's just a line of settings you can set or not! All you have to do is - count from left to right.

For list of article - content part teaser is the best!

Or try {SHOW_CONTENT:CPA,...}

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn
danielreeders
Posts: 14
Joined: Wed 30. May 2007, 09:25

Post by danielreeders »

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?
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

danielreeders
Posts: 14
Joined: Wed 30. May 2007, 09:25

Post by danielreeders »

Thanks for the response, but {NAV_LIST_UL} doesn't show ARTICLES. It only shows CATEGORIES.

I need a reptag to show ARTICLES in the same category as the current article.
User avatar
Oliver Georgi
Site Admin
Posts: 9928
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau-Roßlau
Contact:

Post by Oliver Georgi »

- read - content part teaser is doing this very well!!!

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn
danielreeders
Posts: 14
Joined: Wed 30. May 2007, 09:25

Post by danielreeders »

Oliver Georgi wrote:- read - content part teaser is doing this very well!!!
Well, I gave {TEASER_EX} a try.

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.
User avatar
Oliver Georgi
Site Admin
Posts: 9928
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau-Roßlau
Contact:

Post by Oliver Georgi »

NONONO!!! No TEASER_EX - this is not usable for you or recommend!

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.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn
jscholtysik

Post by jscholtysik »

Hi Daniel,


same sentence here:

OG does not mean TEASER_EX by Erich, he means the content part teaser included in the core code of phpwcms...


Joachim
danielreeders
Posts: 14
Joined: Wed 30. May 2007, 09:25

Post by danielreeders »

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?
And I wrote REPLACEMENT TAG not CONTENT PART in my request!!!

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.
User avatar
Oliver Georgi
Site Admin
Posts: 9928
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau-Roßlau
Contact:

Post by Oliver Georgi »

think again what I said!

Content part to define it in an easy way!

{SHOW_CONTENT:CP,ID} to place it everywhere!

CP = Content Part
CPA = article!

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn
danielreeders
Posts: 14
Joined: Wed 30. May 2007, 09:25

Post by danielreeders »

Oliver Georgi wrote:Content part to define it in an easy way!
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.

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...
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Post by Jensensen »

Hi danielreeders,
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....
set up [x]
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.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
Oliver Georgi
Site Admin
Posts: 9928
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau-Roßlau
Contact:

Post by Oliver Georgi »

I usually place such cps inside non-public sections.

And really - if you have structural problems - make a screenshot and show what you want!

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn
danielreeders
Posts: 14
Joined: Wed 30. May 2007, 09:25

Post by danielreeders »

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
LISTEN UP! Guys, I know HOW to do the Teaser/Show_Content combination.

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! :evil:

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