Page 1 of 1

News module, just can't get read more-link to work

Posted: Mon Jul 18, 2011 12:13 pm
by szd55
Hello

I have "inherited" a CMS made simple site and had to make a partial change in the basic structure. It went (more or less) smoothly, but now I have got stuck in an annoying bug, with news module.

I can get the news pulled to any page with the news-module, even from the right category.

But whatever I try to do with read more...-link, I just get page not found error. The url is like "http://www.xxxxxx.yyy/index.php?mact=Ne ... eturnid=68

Does this seem to be OK?

And if yes, what is the role of detailtemplate etc?

The module is called with:

Code: Select all

{news limit=6 category="News_cat1" number=6 summarytemplate="short" detailtemplate="longer"}
short is like:

Code: Select all

<!-- Start News Display Template -->
{if $pagecount > 1}
  <p>
{if $pagenumber > 1}
{$firstpage}&nbsp;{$prevpage}&nbsp;
{/if}
{$pagetext}&nbsp;{$pagenumber}&nbsp;{$oftext}&nbsp;{$pagecount}
{if $pagenumber < $pagecount}
&nbsp;{$nextpage}&nbsp;{$lastpage}
{/if}
</p>
{/if}
{foreach from=$items item=entry}
<li>
{if $entry->koostekuva}
	{eval var=$entry->koostekuva}
{/if}

<strong>
<a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">{$entry->title|cms_escape}</a>
</strong>

{if $entry->summary}
		{eval var=$entry->summary}

	<p class="readmore">
		[{$entry->morelink}]
	</p>

{else if $entry->content}

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


</li>

{/foreach}
<!-- End News Display Template -->
And long is (I think) like this:

Code: Select all

{* set a canonical variable that can be used in the head section if process_whole_template is false in the config.php *}
{if isset($entry->canonical)}
  {assign var='canonical' value=$entry->canonical}
{/if}

<h1 id="NewsPostDetailTitle">{$entry->title|cms_escape:htmlall}</h1>

<hr id="NewsPostDetailHorizRule" />



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

{if $entry->extra}
	<div id="NewsPostDetailExtra">
		{$extra_label} {$entry->extra}
	</div>
{/if}


{if $return_url != ""}
<div id="NewsPostDetailReturnLink"><br />{$return_url}{if $category_name != ''} - {$category_link}{/if}</div>
{/if}

{if isset($entry->fields)}
  {foreach from=$entry->fields item='field'}
     <div class="NewsDetailField">
        {if $field->type == 'file'}
	  {* this template assumes that every file uploaded is an image of some sort, because News doesn't distinguish *}
          <img src="{$entry->file_location}/{$field->value}"/>
        {else}
          {$field->name}:&nbsp;{eval var=$field->value}
        {/if}
     </div>
  {/foreach}
{/if}
<br /><br /><br /><br /><br />
I must confess that I am a bit confused what is page, what is template and so on, but if anyone could give a simple solution to this problem, I would be more than grateful.

If there is anything else you want to know, please just ask.

Best regards
hank

Re: News module, just can't get read more-link to work

Posted: Mon Jul 25, 2011 10:06 am
by szd55
A really dumb error..problem solved...

I haven't noticed that someone (me? ;)) had accidentally withdrawn the news page from active status...setting it active solved the basic problem..

Sorry for the bother

Hank