News Templates

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
EMR53
Forum Members
Forum Members
Posts: 31
Joined: Tue Aug 01, 2006 6:09 pm

News Templates

Post by EMR53 »

Hello,

Forgive my english because it's not my native language.  ;)

But i'm posting it also here because this is a more active forum.

What i want is something like this guy's did http://www.rightchoice.ie/home.html . They have a short latest news section on the home page. Everything after the summary on a different page and a complete overview selected whit a button.:o

The first thing whit the latest news i understand. But when i'm showing the whole article it's not replacing the Header title of the home page. It is putting the articles content just benied it.

When i show the overview the background image of the latest news come whit it. I.ve  tryd to overrule it whit css selectors.

I dont know how to achieve this effect. Anybody has some expirience whit this???

Thanks in advance. ;D

Eric
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm
Location: Raalte, the Netherlands

Re: News Templates

Post by RonnyK »

To get the title of news in the title of the explorer.

http://forum.cmsmadesimple.org/index.ph ... 953.0.html

To have the news being displayed on a special news page, use detailpage as a parameter. Create a page called "NEWS", uncheck the "show in menu"-option on the option-tab of the page.

Ronny
EMR53
Forum Members
Forum Members
Posts: 31
Joined: Tue Aug 01, 2006 6:09 pm

Re: News Templates

Post by EMR53 »

Hello ,

@ronny

Thats not what i mean,

They have a homepage wih two items, when you click on read more.
the whole page is replaced by a new page.
The you have a page with only links in it.

How did they managed that  ???

Greetings Eric
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: News Templates

Post by Dr.CSS »

Actually Eric they are using news, it made with CMSMS's, when you click on one of the 2 more links at the bottom or one of the 3 up top it goes to another page with the upper 3 news/links shrunk down to fit the main/detail news info and they use the title replacement trick...

"The you have a page with only links in it." I saw the main content of the page..

from the bottom links...







BATTLE OF THE BANKS
Competition for consumers' cash has prompted three banks to not only offer free banking but to pay interest on current accounts




EMR53
Forum Members
Forum Members
Posts: 31
Joined: Tue Aug 01, 2006 6:09 pm

Re: News Templates

Post by EMR53 »

That helped,

Ive set it up correct now :D

Gr. Eric
asfahaan
Forum Members
Forum Members
Posts: 43
Joined: Wed Aug 15, 2007 11:28 am
Location: Auckland, New Zealand

Re: News Templates

Post by asfahaan »

Can you post the final code how to format it like that please??

I am very new to CMSMS. so just seeking for answers at the moment.

Thanks
Asfahaan Mirza
Auckland, New Zealand
EMR53
Forum Members
Forum Members
Posts: 31
Joined: Tue Aug 01, 2006 6:09 pm

Re: News Templates

Post by EMR53 »

@ Asfahaan

What i did is this, on the page where you want the all the newsitems you put this in your code

{news moretext="read more" detailpage="news" summarytemplate='newstotal.tpl' }

I've cald it newstotal ( you can name it anything)

Then you make a new template whit this code
{foreach from=$items item=entry}


{if $entry->formatpostdate}

{$entry->formatpostdate}

{/if}


{$entry->titlelink}

{if $entry->author}
{/if}

{if $entry->summary}

{eval var=$entry->summary}



{$entry->morelink}


{else if $entry->content}


{eval var=$entry->content}
-->
{/if}


{/foreach}
put this template in your modules/news/template folder

Then when you click on a link is goes to detailpage="news" with to news story.

Succes,

Greetings Eric
Post Reply

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