Help with News 2.0

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.
pinthenet

Help with News 2.0

Post by pinthenet »

I'm trying to setup a News solution with a leftside News overview (summary only), which I've set up so in the default template:

{cms_module module='phplayers' showadmin=0}


News:

{cms_module module="news" dateformat="d/m/y H:M" category="General" detailtemplate="detail_nocat.tpl" summarytemplate="summary_nocat.tpl"}


This works as I want on any page until I select a news item from the list. I then get a new page with the detail (what I want), but the News overview is replaced with the same detail. Can I force the news summary list to only show summaries?

It seems that both News calls get the same parameters in this case, but I have another page with news for a different category in the {content} part of the page. When I select this page the summary still shows the summaries for category 'General'.

More questions :
How does news select the Page template used forthe Detaiiled page generated from the morelink - does it use the current page's template?
The dateformat parameter doesn't seem to be  recognised andymore - I always get the default %b %e, %Y
Does the Content type 'News' still work, and what is the difference?

Perhaps I have a general misconception of the News module?

John
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Help with News 2.0

Post by Ted »

Interesting.  I never thought about that usage.  I'll look into it.

The template used on the detail page is the same template that is clicked from.  Do you think it's a good idea to be able to override this?

Dateformat should work.  I'll look into that as well.
pinthenet

Re: Help with News 2.0

Post by pinthenet »

I've fixed the problem for now. For the site I'm currently working on there is not so much news (at present) so we agreed to show the latest article for the genral category at the top of the {content in the home page only. The customer prefers that anyway at the moment

I could imagine solving the problem by using links to 'normal' pages instead of using the News link - the article templates provide quite a lot of flexibility for 'special' actions.

Do you plan to include template definition via admin/DB? Testing is a bit tedious if you don't have direct shell access to the server to edit files.

I realised that I can control the date format via the template...

I don't think a template override is necessary - I just wondered.

One final question - will you add WYSIWYG functionality to the Content window? News is probably something that might be used more frequently by less experienced users and they only have plain text input at present.

I'd also like to add my congratulations for the new features & themes in beta3 - I've only reported problems up to now ;-( It's looking very professional.

John
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Help with News 2.0

Post by Ted »

I fixed the WYSIWYG in svn.

What template definitions do you mean?  Summary and Detail are there already...

Thanks for the kind words.  I'm really happy with it so far.
pinthenet

Re: Help with News 2.0

Post by pinthenet »

If I want to create additional templates for summarytemplate=/detailtemplate= - I need to edit externally and get themm into the News/template directory. Or am I missing something?

By the way, forgot yesterday - I still can't get the help text for News - it can't seem to read the help file

John
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Help with News 2.0

Post by Ted »

Oh, yeah, you're right.  You'd have to upload additional templates...  Kind of a pain, but I can come up with a better solution later on.
fadum

Re: Help with News 2.0

Post by fadum »

wishy wrote: I fixed the WYSIWYG in svn.
Is this for News 2.0 as i still cant seem to get a WYSIWYG

Many Thanks
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Help with News 2.0

Post by Ted »

You grabbed the News module from svn after beta3 was released?
pinthenet

Re: Help with News 2.0

Post by pinthenet »

I justs downloaded revision 1717 and there's no WYSIWYG...

John
fadum

Re: Help with News 2.0

Post by fadum »

Just installed a fresh download and still cant see the WYSIWYG, i must be going mad
pinthenet

Re: Help with News 2.0

Post by pinthenet »

Just installed cms-daily from 28th and I have WYSIWYG!! Yippee

John
iNSiPiD

Re: Help with News 2.0

Post by iNSiPiD »

I don't know what's going on with News any more. I mean, the interafce looks great and all but I just can't seem to work out how to use it. Could you provide sample templates or something?

I had it all working so wonderfully with the previous version and now I just get errors.

My current primary template has a right-hand colum with:

NEWS {cms_module module="News" makerssbutton="true"}
{cms_module module="News" swaptitledate="true" number="8" length="30" moretext="more..." dateformat="D, j M Y"}

And I then had simple modifications of this for different templates to introduce content-specific news. e.g. Education page only showed news of category Education.

Then when you clicked any of the summary they linked beautifully through to the correct item on a dedicated News page that was broken up into the specific categories.

This worked so nicely? Does th enew version allow the same functionality?
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Help with News 2.0

Post by Ted »

You could possibly be the only person that liked the old News module.  :)
iNSiPiD

Re: Help with News 2.0

Post by iNSiPiD »

Possibly due to the time I invested in working it out. :)

I'm not averse to change however.

So is there any documentation for this new version?

Could someone post a sample for the Summary and Detail templates? I'd like to have it all working for my new site launch.

All I can get out of it at the moment is:

Warning: Smarty error: unable to read resource: "template:displaysummary"
Last edited by iNSiPiD on Mon Jul 18, 2005 1:08 am, edited 1 time in total.
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Help with News 2.0

Post by Ted »

I'm still wondering why you don't have any templates...

Anyway, here is summary:

Code: Select all

<!-- Start News Display Template -->
{foreach from=$items item=entry}

<p>

{$entry->titlelink}

<br />{$entry->category}

{if $entry->postdate}

<br />{$entry->postdate|date_format}

{/if}

{if $entry->summary}

<br />{$entry->summary}
<br />[{$entry->morelink}]

{else if $entry->content}

<br />{$entry->content}

{/if}

</p>

{/foreach}
<!-- End News Display Template -->
Detail:

Code: Select all

<h3 id="NewsPostDetailTitle">{$entry->title}</h3>

<hr id="NewsPostDetailHorizRule">

{if $entry->category}

<div id="NewsPostDetailCategory">
{$entry->category}
</div>

{/if}

{if $entry->postdate}

<div id="NewsPostDetailDate">
Posted: {$entry->postdate|date_format}
</div>

{/if}

{if $entry->summary}

<div id="NewsPostDetailSummary">
<strong>
{$entry->summary}
</strong>
</div>

{/if}

<div id="NewsPostDetailContent">
{$entry->content}
</div>

<div>
{$entry->printlink}
</div>
Locked

Return to “CMSMS Core”