Categories In News Module

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
swarfega
Forum Members
Forum Members
Posts: 174
Joined: Mon Sep 06, 2010 10:51 am

Categories In News Module

Post by swarfega »

Please see: http://thriplow.org.uk/cms/news.thriplow

As you can see there is a list on the right column where a list of news categories should be displayed.

This is broken after upgrading to 1.11.

Here is the contents of the browse category template:
{if $count > 0}
<ul class="list1">
{foreach from=$cats item=node}
{if $node.depth > $node.prevdepth}
{repeat string="<ul>" times=$node.depth-$node.prevdepth}
{elseif $node.depth < $node.prevdepth}
{repeat string="</li></ul>" times=$node.prevdepth-$node.depth}
</li>
{elseif $node.index > 0}</li>
{/if}
<li class="newscategory">
{if $node.count > 0}
<a href="{news_category_url name=$node.news_category_name id=$node.news_category_id}">{$node.news_category_name}</a> ({$node.count}){else}<span>{$node.news_category_name} (0)</span>{/if}
{/foreach}
{repeat string="</li></ul>" times=$node.depth-1}</li>
</ul>
{/if}
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Categories In News Module

Post by Dr.CSS »

Check the Default templates to make sure the calls haven't changed, don't think they did but...
swarfega
Forum Members
Forum Members
Posts: 174
Joined: Mon Sep 06, 2010 10:51 am

Re: Categories In News Module

Post by swarfega »

Ive had a check through and changed some double quotes to singles but nothing radical.

I cant see what it might be.

What further information would you need from me to help sort this out?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Categories In News Module

Post by Dr.CSS »

Make sure your tag is in the right case, may be case sensitive where it wasn't before and that your call for categories is correct...
swarfega
Forum Members
Forum Members
Posts: 174
Joined: Mon Sep 06, 2010 10:51 am

Re: Categories In News Module

Post by swarfega »

Well I've had a look and cant see anything obvious. So here Ill post all the parts that go into the news category system:

The call on the global content block:
{news browsecat='1' category='Thriplow Society,Thriplow Village,Local Issues,Parish Council Matters,Gardening Club,Website,Thriplow Shop,Newditch Plantation Trust,TRIC,Green Man Pub,Daffodil Weekend' browsecattemplate='thriplow3'}
Browse Category Template:
{if $count > 0}
<ul class='list1'>
{foreach from=$cats item=node}
{if $node.depth > $node.prevdepth}
{repeat string='<ul>' times=$node.depth-$node.prevdepth}
{elseif $node.depth < $node.prevdepth}
{repeat string='</li></ul>' times=$node.prevdepth-$node.depth}
</li>
{elseif $node.index > 0}</li>
{/if}
<li class='newscategory'>
{if $node.count > 0}
<a href="{news_category_url name=$node.news_category_name id=$node.news_category_id}">{$node.news_category_name}</a> ({$node.count}){else}<span>{$node.news_category_name} (0)</span>{/if}
{/foreach}
{repeat string='</li></ul>' times=$node.depth-1}</li>
</ul>
{/if}
UTD:
$name = preg_replace(array('/ /', '/[^A-Za-z0-9-\-]/', '/--/'),array('-', '', '-'),$params['name']);
$id = $params['id'];
echo 'category/'.$id.'/'.$name.'.thriplow';
Your help would be appreciated.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Categories In News Module

Post by Dr.CSS »

What is the UDT for and where does it come in?...
swarfega
Forum Members
Forum Members
Posts: 174
Joined: Mon Sep 06, 2010 10:51 am

Re: Categories In News Module

Post by swarfega »

That prettified the urls for news categories.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Categories In News Module

Post by Dr.CSS »

I would take everything back to default as much as possible to see if anything shows up then go forward till it breaks, like don't use the UDT, no pretty URLs, etc...
swarfega
Forum Members
Forum Members
Posts: 174
Joined: Mon Sep 06, 2010 10:51 am

Re: Categories In News Module

Post by swarfega »

ok I have removed the utd and the category template but the news categories are still not showing.

Im using this call:
{news browsecat='1' category='Thriplow Society,Thriplow Village,Local Issues,Parish Council Matters,Gardening Club,Website,Thriplow Shop,Newditch Plantation Trust,TRIC,Green Man Pub,Daffodil Weekend'}
Is that right?
carasmo
Power Poster
Power Poster
Posts: 506
Joined: Thu Feb 08, 2007 6:11 pm

Re: Categories In News Module

Post by carasmo »

Try clearing cache or checking if that page where the news module call is cached (in the second panel of the content page). Just an idea. Hope I don't run across this issue.
swarfega
Forum Members
Forum Members
Posts: 174
Joined: Mon Sep 06, 2010 10:51 am

Re: Categories In News Module

Post by swarfega »

The news page wont load in the editor and if you look at thriplow.org.uk its not displaying properly :/
carasmo
Power Poster
Power Poster
Posts: 506
Joined: Thu Feb 08, 2007 6:11 pm

Re: Categories In News Module

Post by carasmo »

remove the category call on this page and see if it corrects. There's a smarty error, or at least whenever I have a smarty error, my page removes all css and sometimes it doesn't even say that I'm having an error.
carasmo
Power Poster
Power Poster
Posts: 506
Joined: Thu Feb 08, 2007 6:11 pm

Re: Categories In News Module

Post by carasmo »

Clear cache.

Also, you know the best way to upgrade is to:

Make a subdomain
Make a copy of the database (export) in phpMyAdmin
Make a new database and load the copy
Copy the site (images, etc) into the subdomain directory
Change the config file in the subdomain directory and put in the new database and pw and the path

Upgrade the copy and get that working
Then
Move the old files to a new folder
Move the subdomain content back out to the top level
Change the config back to the top domain

That way your live site is never touched and if you run into a bug, then it can be worked out. Also, I never upgrade a new version without waiting a month and checking the boards for issues. That's why I'm here a lot these days.
carasmo
Power Poster
Power Poster
Posts: 506
Joined: Thu Feb 08, 2007 6:11 pm

Re: Categories In News Module

Post by carasmo »

paste the template for that page where the news module call is being used.
swarfega
Forum Members
Forum Members
Posts: 174
Joined: Mon Sep 06, 2010 10:51 am

Re: Categories In News Module

Post by swarfega »

I put my stylesheet through a validator and it found an odd character. so the site works now but Im still unable to edit pages on my main site. Sites that use other templates edit fine.
Last edited by swarfega on Thu Sep 13, 2012 7:56 am, edited 1 time in total.
Post Reply

Return to “The Lounge”