multiple categories on front page

Author Message

Tim Brown

Sunday 09 January 2005 7:50:17 pm

I am trying to configure my site so that News can be the front page info.

However I want to have several sub categories of my news, and as each categorized news item goes up I would like it to feature on the front page.

Any tips on how to do this?

kevin wei

Sunday 09 January 2005 9:14:56 pm

i always use these code from folder.tpl

{section show=is_unset( $versionview_mode )}
              {section show=$node.object.data_map.show_children.content}
              {let page_limit=10
                 list_items=array()
                 list_count=0}

              {section show=or( $view_parameters.day, $view_parameters.month, $view_parameters.year )}
                {let time_filter=array( and,
                                        array( 'published', '>=',
                                               maketime( 0, 0, 0,
                                                         $view_parameters.month, cond( $view_parameters.day, $view_parameters.day, 1 ), $view_parameters.year ) ),
                                        array( 'published', '<=', maketime( 23, 59, 59,
                                                         cond( $view_parameters.day, $view_parameters.month, $view_parameters.month|inc ), cond( $view_parameters.day, $view_parameters.day, 0 ), $view_parameters.year ) ) )}
                {set list_items=fetch_alias( children, hash( parent_node_id, 63,
                                                             offset, $view_parameters.offset,class_filter_type, include, class_filter_array, array('folder'), attribute_filter, $time_filter,
                                                             sort_by, $node.sort_array,
                                                             limit, $page_limit ) )
                     list_count=fetch_alias( children_count, hash( parent_node_id, $node.node_id) )}
                {/let}
               {section-else}
                {set list_items=fetch_alias( children, hash( parent_node_id, 63,
                                                             offset, $view_parameters.offset,class_filter_type, include, class_filter_array, array('folder'),

                                                             sort_by, $node.sort_array,
                                                             limit, $page_limit ) )}
                {set list_count=fetch_alias( children_count, hash( parent_node_id,$node.node_id ) )}
                {/section}
 <div>
				{section var=child loop=$list_items }
  
                 <a href={concat('content/view/full/',$child.node_id)|ezurl}>{$child.name|wash()}</a>
                 {/section}
                 
</div>                 {/section}
                 {/section}
                    

maybe can help u!

Tim Brown

Monday 10 January 2005 5:39:25 pm

thanks, I've only been playing around with EZ in offline mode, so I'll give that a shot when I actually get it loaded on my site.

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 19 2025 11:41:16
Script start
Timing: Jan 19 2025 11:41:16
Module start 'layout'
Timing: Jan 19 2025 11:41:16
Module start 'content'
Timing: Jan 19 2025 11:41:16
Module end 'content'
Timing: Jan 19 2025 11:41:16
Script end

Main resources:

Total runtime0.0178 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 589.1797152.6250
Module start 'layout' 0.00560.0034 741.804739.4453
Module start 'content' 0.00890.0069 781.250089.2578
Module end 'content' 0.01580.0019 870.507834.3047
Script end 0.0177  904.8125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002413.3986140.0002
Check MTime0.00105.9094140.0001
Mysql Total
Database connection0.00105.820910.0010
Mysqli_queries0.002916.433130.0010
Looping result0.00000.089910.0000
Template Total0.00158.410.0015
Template load0.00074.155310.0007
Template processing0.00084.238510.0008
Override
Cache load0.00042.505810.0004
General
dbfile0.00147.842180.0002
String conversion0.00000.032240.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