News Module - Templating question, or ... ?

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
Zeynab
New Member
New Member
Posts: 9
Joined: Sun Jul 05, 2009 12:48 pm

News Module - Templating question, or ... ?

Post by Zeynab »

Hi,

I'm using the latest CMSMS version 1.6, standard installation.

I want to display the news items in a specific way, but after reading all of the FAQ and docs and half of the questions discussed here, I'm still nowhere near a solution.

1. I want to display the box in the sidebar, but instead of showing the title plus the content, I want just the linked titles to display, not just 3, instead the 5 most recent news titles.

2. Upon clicking a title people should reach the full news article itself. This is already done by the standard installation.

but

3. I want  a menu link "news" which will display titles and summaries of all news items, and if you click a title of any, the single news page comes up.

Right now my menu link only shows the single news page with the recentmost news article.

Help would be truly appreciated, I just can't seem to grasp how all those templates and tags interact with each other.  E.g. I tried to find the tag which puts the news into the news page I have, but only find the tag in the sidebar, not the one in the main content area...?

Cheers

Zeynab
reneh
Dev Team Member
Dev Team Member
Posts: 446
Joined: Tue Nov 28, 2006 8:39 pm

Re: News Module - Templating question, or ... ?

Post by reneh »

Its all in the module help!


{news}
ReneH 8-)
A search will save you hours waiting for an answer! Image
Zeynab
New Member
New Member
Posts: 9
Joined: Sun Jul 05, 2009 12:48 pm

Re: News Module - Templating question, or ... ?

Post by Zeynab »

Hi,

as I wrote, I - exhaustingly - perused the documentation, the FAQ, the news module help pages and this forum. So I quite clearly read all that and still haven't found the solution. That tag is in my sidebar template alright (it's there by default apparently).

However, I have neither discovered so far how to get this one to display only linked titles, nor have I discovered how to get the news page called in this tag to display all news items with just their summaries, and how to get these then to link to and call up individual pages with the full news items. I can't even find out just how the called news page gets called itself, as I can't find any news tag anywhere but the sidebar and I filched my templates with a fine comb.

I discovered a plethora of templates in the admin interface, but the help info is rather very vague as to what those are good for or how they get entered into an individual content area or page, and what calls them precisely.

If the help pages had been helpful to me,  I wouldn't be asking here *sigh*. :(

Cheers,

Zeynab
Last edited by Zeynab on Thu Jul 09, 2009 7:23 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: News Module - Templating question, or ... ?

Post by Dr.CSS »

The news tag in a default templates says {news number='3' detailpage='news'} so this calls the news and uses the default summary template just like it says in the help if you looked there you would have seen at least 18 options it takes like...

(optional) summarytemplate="" - Use a separate database template for displaying the article summary. This template must exist and be visible in the summary template tab of the News admin, though it does not need to be the default. If this parameter is not specified, then the current template marked as default will be used.

So if you wanted to display just the title link you go to the news admin and make a new summary template and call it in the news tag...

If you want all news on one page displaying just the summary {news} will do it, there are no news pages per say just news articles which can be reached by clicking the title link if no summary is used or the more link if it is a summary...
Zeynab
New Member
New Member
Posts: 9
Joined: Sun Jul 05, 2009 12:48 pm

Re: News Module - Templating question, or ... ?

Post by Zeynab »

Hi,

I'm very sorry, but your answer is pure gobbledegook to me.

I am NOT a coder, I'm a simple everyday webmaster, who needs some sort of instruction to achieve what needs to be achieved.

E.g.:

"Use a separate database template for displaying the article summary."

What is a separate "database template", where and HOW do I write it, where will it be saved, what needs to go in there, what DOES IT DO, and how do I work it into what already exists?

See the problem? I could go on, not just with what you wrote, but also with what's written in those helpfiles. So, nice, there are options, I saw them. But there's no explanation on how to use them and to what effect. There are code snippets printed here and there, but no explanation (or screenshots) as to where they go, what effect they have and what else needs to be adjusted. Everything is written from the vantage point of someone who already knows what needs to be done and not for someone who is new to the whole system.

As CMSMS news apparently work quite differently from how news systems work in other CMS (at least those 30-35 different ones I so far installed and customized), both your answer and the helpfiles lack salient info for those who are not knee-deep into the code.

What I need to do is:

- display only the linked titles in the sidebar, 5 or 10 of them

- clicking on a link should bring up the relevant news item

- clicking on the link "news" in the menu should bring up a paginated archive of all news items in chronological order

- clicking on any item in that archive should bring up the relevant news item

I really need a bit more to work with than just "templates need to be written" or "options exist".  ;)



Cheers,

Zeynab
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: News Module - Templating question, or ... ?

Post by jmcgin51 »

Zeynab - have you looked at the existing default News templates (Summary, Detail, etc.)?

If I were you, I would create 2 News categories, then create a couple of News articles in each category.

Then create a page and place the {news} module call in this page, and see what happens when you view that page.  Then modify the default summary template (delete something, add something, etc.), and see how that affects the results when you refresh the page.

It also sounds like you would benefit from the News documentation:
wiki.cmsmadesimple.org/index.php/User_Handbook/Admin_Panel/Content/News

Play with things a bit, and post back with what you learn, and what you still have questions about.
Zeynab
New Member
New Member
Posts: 9
Joined: Sun Jul 05, 2009 12:48 pm

Re: News Module - Templating question, or ... ?

Post by Zeynab »

Hi,

I seem to be writing Klingon... ::)

Cheers,

Zeynab 
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: News Module - Templating question, or ... ?

Post by Dr.CSS »

No not klingon but "can you hold my handon"...

OK here goes...

go to news admin click summary templates, hit make new template, name it, remove all calls, leaving the for each calls, but the one that has titlelink in it, you can leave the first div call at top and closing div at bottom...
this will give you a template that only has the link to the article...

In the area you want to show just the title links {news summarytemplate="nameofnewtemplate" number="5"}
clicking on the link will bring up your news item in the area where you have the {content} tag...

If you don't have one yet create new page call it News, add {news} tag in content, if you only want a certain amount of news items use the number call again, clicking any of the links in the news items will replace any content on that page with just the news article...

The reference to database templates has to do with the fact that news used to use tewmplates hand coded in the news > templates folder and now you make new ones in the news admin instead...
Post Reply

Return to “Layout and Design (CSS & HTML)”