Forums / Developer / Context Sensitive Articles

"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".

Context Sensitive Articles

Author Message

Edavalath prashanth Narayanan

Monday 28 November 2005 3:33:25 am

Hi,
I want to implement a FAQ in my site.I have 5 differant sections as my topmenu.The site consists of a dynamic left menu which is loaded according to the top menu click.The FAQ option resides in the left menu .

I want to make the FAQ link menu sensitive ie. The FAQs will be grouped according to the various Sections.As i click the FAQ link the FAQ's for the particular section should be displayed.

I am facing problems with fetch function's attribute_filter option. Iam trying to restrict the FAQ fetching with an attribute (a single choice selection) value .But the fetch function returns a null result set .

Please help..

Iam using Exponential 3.6.1 with Apache in Linux O.S.

Kristof Coomans

Monday 28 November 2005 6:59:30 am

Can you paste the code you're trying to use?

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

Edavalath prashanth Narayanan

Monday 28 November 2005 9:22:38 pm

Hi,
When i click the FAQ link from left menu it should list the FAQ title's for the particular FAQ Group. I have created a custom FAQ class with the following fields,

FAQ Class:
faqtitle : textline,
faqGroup : single choice selection
faqQuestion : textblock
faqAnswer : textblock

FAQ group is the section name that i provided in faqGroup selection.

<div class="pagetitle">
FAQs
</div>

{* Grab all the FAQs based on the FAQ Group ID. *}
{let children=fetch( content,
list,
hash( parent_node_id, 174,
attribute_filter, array( array(
'/faq/faqgroup',
'=',
'1' ) ),
sort_by, $node.sort_array )) }


{* Loop through all articles that we just fetched. *}
{section name=Child loop=$children }

{let children=fetch( content,
list,
hash( parent_node_id, 174,
sort_by, $node.sort_array )) }

{* Display a link to the article. *}
<a href={$:item.url_alias|ezurl} >
{$:item.name} </a>
<br />




{* End of loop. *}
{/section}
{/let}

I am trying to retrieve the FAQ articles for the First section by providing a static value '1' for the attribute 'faqgroup' in faq class . 174 is node id for FAQ folder.
If i remove this attribute_filter line..All faqs are listed..

Kindly Help,
Regards..