Forums / Setup & design / Just one list for parent and child

Just one list for parent and child

Author Message

Leandro Alves

Thursday 29 September 2005 7:59:50 am

Hi!

<b>I have this structure:</b>

-forum (node 63)
--|
--|forum_topic1
-----|
-----|forum_reply1
-----|forum_reply2
--|
--|forum_topic2
-----|forum_reply1

I would like to make just a list with all forum_topic and forum_reply by the last published order.

<b>I have tried this:</b>

   
{let folder_list=fetch(content,list,hash(parent_node_id,63,
                      class_filter_type,include,
                      class_filter_array,array('folder')))}

{section var=folder loop=$folder_list}

{let last=fetch('content','tree',hash(parent_node_id,               
                                     $folder.node_id,
             sort_by, array(array('published', false() ) ),
             limit, 5 ) )}

{section var=reply loop=$last show=$last}
    <a href={concat( $reply.parent.url_alias, '#msg', 
     $reply.node_id )|ezurl}>{$reply.name|wash}</a>
{/section}
{/let}

{/section}
{/let}

This works fine and show me the last five itens published.

But I have a wrong link for all forum_topic nodes.

for example:

<b>If the item is a forum_reply I have this link:</b>
http://.../folder/forum_topic#msg99 <b>(its ok)</b>

<b>If the item is a forum_topic I have this link:</b>
http://.../folder#msg99 <b>(its wrong)</b>

This link <b>http://.../folder#msg99</b> should be like this <b>http://.../folder/forum_topic</b>

I suppose I have to change something in my code, but I don't know what and I need help.

Thanks in advance!

Leandro

Kristof Coomans

Thursday 29 September 2005 9:33:04 am

{section var=reply loop=$last show=$last}
    {section show=$reply.class_identifier|eq('forum_reply')}
    <a href={concat( $reply.parent.url_alias, '#msg', 
     $reply.node_id )|ezurl}>{$reply.name|wash}</a>
    {section-else}
    <a href={$reply.url_alias|ezurl}>{$reply.name|wash}</a>
    {/section}
{/section}

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Eder Trevisoli

Thursday 29 September 2005 11:37:15 am

Hey Leandro,
I don&acute;t understand, hehehe ;-(

______________
Eder Trevisoli
BRASIL

Leandro Alves

Thursday 29 September 2005 12:26:35 pm

Hello Kristof!!!!

Thanks a lot for your reply... It works like a charm!!!! :)

Cheers!

Leandro

eZ debug

Timing: Jan 18 2025 04:24:32
Script start
Timing: Jan 18 2025 04:24:32
Module start 'content'
Timing: Jan 18 2025 04:24:33
Module end 'content'
Timing: Jan 18 2025 04:24:33
Script end

Main resources:

Total runtime0.7449 sec
Peak memory usage4,096.0000 KB
Database Queries199

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 587.7344180.8281
Module start 'content' 0.00640.6203 768.5625598.3828
Module end 'content' 0.62670.1181 1,366.9453337.3984
Script end 0.7448  1,704.3438 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00470.6337210.0002
Check MTime0.00170.2320210.0001
Mysql Total
Database connection0.00070.097810.0007
Mysqli_queries0.650587.33081990.0033
Looping result0.00220.29481970.0000
Template Total0.717696.320.3588
Template load0.00250.331220.0012
Template processing0.715196.009720.3576
Template load and register function0.00020.032210.0002
states
state_id_array0.00100.132610.0010
state_identifier_array0.00100.128120.0005
Override
Cache load0.00210.2871410.0001
Sytem overhead
Fetch class attribute can translate value0.00170.234140.0004
Fetch class attribute name0.00210.277860.0003
XML
Image XML parsing0.00230.306540.0006
class_abstraction
Instantiating content class attribute0.00000.002860.0000
General
dbfile0.00260.3541330.0001
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 21
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs