Getting the section name of specified node

Author Message

Piotr Kwiatkowski

Friday 08 October 2004 5:10:30 am

Hi,

How to get the section name of node?

I want to override my template for folder class with my own (showing the search result). And I want to present:
1. Publish date
2. Folder name
3. Section name of specifed folder

I have got following code:

<th>{$node.object.published|l10n(shortdate)}</th>
<th><a href={$node.url_alias|ezurl}>{attribute_view_gui attribute=$node.object.data_map.name}</a></th>
<th>{$node.object.section_name|wash}</th>

Analogical to default I have changed the {$node.object.class_name|wash} to {$node.object.section_name|wash}. But it does not work. Published date and folder name works fine, but as I said section name is missing.

UPDATE:
I have found the section ID: {$node.object.section_id}.
So how to get the section name having a saction ID in template?

Thanks for help.

Lida Popelo

Friday 08 October 2004 1:30:10 pm

Hello Piotr Kwiatkowski,

Try this :

{let sectionobj=fetch( 'section', 'object', hash( 'section_id', 1 ) )}
    {$sectionobj.name}
{/let}

i found this information here:
http://ez.no/ez_publish/documentation/reference/data_fetching/section/object

Piotr Kwiatkowski

Saturday 09 October 2004 12:36:48 pm

Thanks, works fine.

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

Main resources:

Total runtime0.7588 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.0065 588.1641152.6563
Module start 'layout' 0.00650.0027 740.820339.4922
Module start 'content' 0.00920.7482 780.3125471.7422
Module end 'content' 0.75740.0014 1,252.05478.4375
Script end 0.7588  1,260.4922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4271160.0002
Check MTime0.00130.1755160.0001
Mysql Total
Database connection0.00060.085210.0006
Mysqli_queries0.713293.9891570.0125
Looping result0.00050.0704550.0000
Template Total0.724595.520.3622
Template load0.00210.280820.0011
Template processing0.722395.194020.3612
Template load and register function0.00020.021510.0002
states
state_id_array0.00080.108710.0008
state_identifier_array0.00280.374420.0014
Override
Cache load0.00180.2348240.0001
Sytem overhead
Fetch class attribute can translate value0.00070.087720.0003
Fetch class attribute name0.00150.195830.0005
XML
Image XML parsing0.00050.063420.0002
class_abstraction
Instantiating content class attribute0.00000.000930.0000
General
dbfile0.00130.1714100.0001
String conversion0.00000.001140.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
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs