Make Toolbar Latest News only display articles - no comments

Author Message

Tim Dickinson

Friday 14 April 2006 10:10:23 am

Hi everyone,

Having just worked out how to let anyone (anonymous users) add comments to articles, I now need some way to only have articles (no comments) showing up in the Latest News section of the toolbar. Anyone got any ideas?

I'm sure this is quite easy to do and I'm just missing a trick somewhere.

Any help much appreciated and Happy Easter!

Tim

http://www.AdBalance.com - Ad network news and reviews
http://www.DevPublisher.com - Website publisher guides, tools and news
http://www.AudioMelody.com - Make better music

Sascha Frinken

Saturday 15 April 2006 12:48:32 am

First you need to find the template that is in charge for the latest news.

In this case it is: design/standard/templates/toolbar/full/node_list.tpl

Then you create an override template for it. There are a few different methods to do this. In this example I just saved the template to design/plain/override/templates/toolbar/full/ as plain is my sitedesign.

In this template you have to look for "fetch( content, tree,..."

Change

  ...
  class_filter_type, exclude,
  class_filter_array, array( 'folder' ),
  ...

to:

  ...
  class_filter_type, exclude,
  class_filter_array, array( 'folder', 'comment' ),
  ...

HTH

Sascha

Tim Dickinson

Saturday 15 April 2006 7:29:53 am

Amazing - thankyou!

Tim

http://www.AdBalance.com - Ad network news and reviews
http://www.DevPublisher.com - Website publisher guides, tools and news
http://www.AudioMelody.com - Make better music

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 01:21:28
Script start
Timing: Jan 31 2025 01:21:28
Module start 'layout'
Timing: Jan 31 2025 01:21:28
Module start 'content'
Timing: Jan 31 2025 01:21:28
Module end 'content'
Timing: Jan 31 2025 01:21:28
Script end

Main resources:

Total runtime0.0259 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 588.3906151.2422
Module start 'layout' 0.00570.0044 739.6328220.7500
Module start 'content' 0.01020.0141 960.3828997.9922
Module end 'content' 0.02430.0015 1,958.375033.9922
Script end 0.0258  1,992.3672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003112.0950140.0002
Check MTime0.00124.6319140.0001
Mysql Total
Database connection0.00062.368010.0006
Mysqli_queries0.002610.182930.0009
Looping result0.00000.061710.0000
Template Total0.00114.210.0011
Template load0.00093.310210.0009
Template processing0.00020.915510.0002
Override
Cache load0.00062.394710.0006
General
dbfile0.00187.104880.0002
String conversion0.00000.050740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs