a probably easy when you know how news question

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
macko
Forum Members
Forum Members
Posts: 21
Joined: Fri Oct 17, 2008 11:28 pm

a probably easy when you know how news question

Post by macko »

My news question is this - I have a link in the main menu at the top of my page called news.  When I click this link my news articles are nicely ordered and laid out down the rhs of the page - using a summary template.  This bit I fully understand.

However, when the "news" link from the main menu is clicked I would prefer for the most recent news article to appear in full detail in the {content} area, as though I had clicked .[..more] on the most recent summary article. 

Does anyone know if this is possible - do I have to hack the link in the main menu?

many thanks

(cmsms 1.4.1)
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: a probably easy when you know how news question

Post by calguy1000 »

Yes, yes it is..... it's some simple smarty magic.  I've done it.  Not gonna tell you how.

the solution is left as an exersise to the user.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
macko
Forum Members
Forum Members
Posts: 21
Joined: Fri Oct 17, 2008 11:28 pm

Re: a probably easy when you know how news question

Post by macko »

aaah no a challenge!  my designer brain can't cope with php.  I don't even know what "smarty" is yet but I'm on the case.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: a probably easy when you know how news question

Post by calguy1000 »

actually, I kinda lied.

It is simple smarty logic... assuming you know where to look for a few things.  and after a bit of reviewing (i.e: making sure I wasn't just shooting my mouth off), I found that that not everything was documented.

Anyways.

On my news page here: http://calguy1000.com/news.html The first news article is displayed in detail view.   Because I use a bit of smarty magic and an undocumented feature of the news module.

Here's the exerpt out of my summary template:

Code: Select all

{foreach from=$items item=entry name='news'}
{if $smarty.foreach.news.index == 0}
   {news action='detail' articleid=$news->id}
{else}
<div class="NewsSummary">
....
{/if}
{/foreach}
Now the rest is left for an exercise to the user.
Last edited by calguy1000 on Sat Nov 29, 2008 12:35 am, edited 1 time in total.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
macko
Forum Members
Forum Members
Posts: 21
Joined: Fri Oct 17, 2008 11:28 pm

Re: a probably easy when you know how news question

Post by macko »

great!

thanks for getting me started, I'll report back when the problem is solved.

cheers dude
Locked

Return to “[locked] Installation, Setup and Upgrade”