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

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

Main resources:

Total runtime0.7791 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 589.0469152.6250
Module start 'layout' 0.00560.0027 741.671939.4453
Module start 'content' 0.00830.7691 781.1172547.2500
Module end 'content' 0.77740.0017 1,328.367212.1641
Script end 0.7791  1,340.5313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4305160.0002
Check MTime0.00140.1752160.0001
Mysql Total
Database connection0.00070.092910.0007
Mysqli_queries0.724592.9884570.0127
Looping result0.00050.0605550.0000
Template Total0.750396.320.3752
Template load0.00210.267320.0010
Template processing0.748296.036920.3741
Template load and register function0.00030.033810.0003
states
state_id_array0.00100.127610.0010
state_identifier_array0.00090.116820.0005
Override
Cache load0.00180.2345560.0000
Sytem overhead
Fetch class attribute can translate value0.00060.080720.0003
Fetch class attribute name0.00100.124640.0002
XML
Image XML parsing0.00060.077020.0003
class_abstraction
Instantiating content class attribute0.00000.001040.0000
General
dbfile0.00110.1466160.0001
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs