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

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

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