Article contents and "latest news" box

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
d-lexy
Posts: 76
Joined: Fri 22. Oct 2004, 22:59
Location: Toronto, Canada / Tallinn, Estonia

Article contents and "latest news" box

Post by d-lexy »

Hello. Im putting together a site baed on wcms. Everything is coming along great, except one challenge. I have a layout where there is the contents of the selected article. On the left side though, there is a box that I need to show last 3 articles from a specific (News) structure level. Is that possible?

Thanks in advance!
oldfolk
Posts: 41
Joined: Tue 5. Oct 2004, 17:15

Post by oldfolk »

greetings

There is a nice tag called like this
{RELATED:5:keyword}
related is capitalized, followed by a colon ":" followed by the number of items you want to have displayed "5:" followed by the keyword entered in the article summary.

When you write your articles, whether news or something else, there is an input box called keywords. The words entered there are used by the internal search engine. To use keywords in the RELATED: output enter the keywords surrounded by asterik like this

Code: Select all

*keyword*
You can use mulitiple keywords, (which enables you to call them in different sections) but to be called thru 'RELATED:' they must EACH be surrounded by asteriks. My understanding is that it is not case sensitive

Hope this makes sense
sdicivit
Posts: 4
Joined: Thu 21. Oct 2004, 13:52

Post by sdicivit »

I've found that code very simple, usefull and versatile, but, is there a way to sort the titles? I mean, I'd like them to be displayed in the same descending start date order in which they are in article center; is that possible?
Thanks a lot
oldfolk
Posts: 41
Joined: Tue 5. Oct 2004, 17:15

Post by oldfolk »

Umm, I think they go according to creation date, so if you change the display order in the article listing to be different than the creation date I'm not sure it would make a difference in the listing.

If you just want to show the newest articles regardless of their categories you would just use {NEWS:5) (change the No.5 to however many you want to have displayed)

Then the newest in desending order would be listed with first the date then the title on each line. (The newest would be at the top of the list)

Actually I'm just getting to know this program myself. I am finishing a site that would normally have taken me a day or two but has taken a month because of learning this program as I go. :roll: So there may be other ways to do this.

Have you found the manual yet? It is very good, but it took me a while to find. In case you haven't -here is the link:

http://docu.fhss.de/english_version.phtml

I find I am visiting it often but am getting more comfortable with the program as I go. Good luck...
d-lexy
Posts: 76
Joined: Fri 22. Oct 2004, 22:59
Location: Toronto, Canada / Tallinn, Estonia

Post by d-lexy »

oldfolk,

thanks for your tip! It works perfect.

But I have one more question, and maybe I'll be able to find it in the manual that you referred to.
How can I show, lets say the Subtitle and/or Summary below the Article Title in the list.

Thanks again!
oldfolk
Posts: 41
Joined: Tue 5. Oct 2004, 17:15

Post by oldfolk »

ya got me!

The template for regular listings would be in

'phpwcms_template/inc_cntpart/articlesummary/' then either '/list' or '/article'

where you can add or subtract replacement codes, but I have no idea where the template for the 'NEW:' or 'RELATED:'listings are.

Would be nice to know! Anyone?
oldfolk
Posts: 41
Joined: Tue 5. Oct 2004, 17:15

Post by oldfolk »

okay, here's what I found while searching on another matter:

in /include/inc_front/content.func.inc.php on or around line # 409 it shows
all new article list sorted by date
in that section it refers to
template_default -"news" -
if you look in //-include/inc_conf/conf.template_default.inc.php-//

you will find
// new articles


and
// related articles based on keywords
Near as I can tell you can format it there. You can try adding the articleSummary or articleSubHead found higher up under article default.

Bear in mind that I have no idea what I'm talking about, so save the original intact and don't blame me if it breaks.... :twisted:

Your assignment, should you choose to accept it, is to let us know if it works or fails :!:
d-lexy
Posts: 76
Joined: Fri 22. Oct 2004, 22:59
Location: Toronto, Canada / Tallinn, Estonia

Post by d-lexy »

I went through the files, but didn't find anything that I could make this change through. I'm sure it a small detail that I just don't see, but where is it...
Post Reply