[SOLVED] News module - Summary & Detailed Template help

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
wournos
Forum Members
Forum Members
Posts: 40
Joined: Sat Jun 23, 2007 6:23 pm

[SOLVED] News module - Summary & Detailed Template help

Post by wournos »

Hi,

I have been trying to work the news module into my front page but no matter what I do the design ends up really twisted. Is it possible to add tables etc to the Summary and Detailed Templates and add every 'squiggly bracket' needed and skip the {if}s. Or are the {if}s really needed?
During one of my first attempts I added some of the IDs from Summary to my html code and it worked somewhat well. But I couldn't do anything about the Detailed template because it had Classes and those would clash with my design classes.

This is an image of the news area. It's filled with tables, table rows and cells.

Image

I want the news module to start underneath the red banner.
If you need to have a look at the code then just ask and I'll try add that. It's huge and not very easy to firgure out (for me anyway).

I'd appriciate all help I can get. If there's past topics or tutorials that I haven't found, please share those

/W
Last edited by wournos on Thu Jun 28, 2007 11:51 am, edited 1 time in total.
jatinder
Forum Members
Forum Members
Posts: 17
Joined: Thu Apr 12, 2007 1:49 pm

Re: News module - Summary & Detailed Template help

Post by jatinder »

Something like this should work:

Code: Select all

{foreach from=$items item=entry}
<h2>{$entry->title}</h2>
<small>Posted by {$entry->authorname} on {$entry->formatpostdate}</small>
<p>{$entry->summary}</p>
<p><a href="{$entry->link}">Full Article</a> | <a href="{$entry->link}">{count_news_comments theid=$entry->id} comments</a></p>
{/foreach}
You will also need to install the comments module and create a UDT named "count_news_comments". Take a look at http://wiki.cmsmadesimple.org/index.php ... t/Comments page to see the code for the UDT.
wournos
Forum Members
Forum Members
Posts: 40
Joined: Sat Jun 23, 2007 6:23 pm

Re: News module - Summary & Detailed Template help

Post by wournos »

Ah. Thank you. I implemented it with my xhtml template (used html yesterday) and it works wonders. I have also figured out the whole if/else bit and it looks great! There's hope for me too.  ;D

Thanks again!

/W
Post Reply

Return to “CMSMS Core”