images in folder description

Author Message

Bengt Danielsen

Thursday 23 September 2004 3:45:42 am

I am trying to get an image in folder description. Is there anyway to do this easy?
Have tried to add an objectrelated attribute in folder class, and put this code in the design/plain/override/templates/full/folder.tpl

{* Folder - Full view *}
<div class="content-view-full">
    <div class="class-article">

        <h1>{$node.object.data_map.name.content|wash()}</h1>

        {section show=$node.object.data_map.bilde.content.is_empty|not}
            <div class="attribute-image">
                {attribute_view_gui attribute=$node.object.data_map.bilde align=right}
            </div>
        {/section}

        {section show=$node.object.data_map.short_description.content.is_empty|not}
            <div class="attribute-short">
                {attribute_view_gui attribute=$node.object.data_map.short_description}
            </div>
        {/section}

        {section show=$node.object.data_map.description.content.is_empty|not}
            <div class="attribute-long">
                {attribute_view_gui attribute=$node.object.data_map.description}
            </div>
        {/section}

        {section show=is_unset( $versionview_mode )}
        {section show=$node.object.data_map.show_children.content}
            {let page_limit=10
                 list_items=array()
                 list_count=0}

            {section show=or( $view_parameters.day, $view_parameters.month, $view_parameters.year )}
                {let time_filter=array( and,
                                        array( 'published', '>=',
                                               maketime( 0, 0, 0,
                                                         $view_parameters.month, cond( $view_parameters.day, $view_parameters.day, 1 ), $view_parameters.year ) ),
                                        array( 'published', '<=',
                                               maketime( 23, 59, 59,
                                                         cond( $view_parameters.day, $view_parameters.month, $view_parameters.month|inc ), cond( $view_parameters.day, $view_parameters.day, 0 ), $view_parameters.year ) ) )}
                {set list_items=fetch_alias( children, hash( parent_node_id, $node.node_id,
                                                             offset, $view_parameters.offset,
                                                             attribute_filter, $time_filter,
                                                             sort_by, $node.sort_array,
                                                             limit, $page_limit ) )
                     list_count=fetch_alias( children_count, hash( parent_node_id, $node.node_id ) )}
                {/let}
            {section-else}
                {set list_items=fetch_alias( children, hash( parent_node_id, $node.node_id,
                                                             offset, $view_parameters.offset,
                                                             sort_by, $node.sort_array,
                                                             limit, $page_limit ) )}
                {set list_count=fetch_alias( children_count, hash( parent_node_id, $node.node_id ) )}
            {/section}

            <div class="content-view-children">
                {section var=child loop=$list_items sequence=array(bglight,bgdark)}
                    {node_view_gui view=line content_node=$child}
                {/section}
            </div>

            {include name=navigator
                     uri='design:navigator/google.tpl'
                     page_uri=$node.url_alias
                     item_count=$list_count
                     view_parameters=$view_parameters
                     item_limit=$page_limit}
            {/let}

        {/section}
        {/section}

    </div>
</div>

Or can I have an article that will show in full view as standard in a folder?

Bengt Danielsen

Frederik Holljen

Thursday 23 September 2004 4:46:52 am

The description field of the folder class accepts XML input and you can embed an image directly using a related object and the <object> tag.
Is this what you need? If not, what exactly are you trying to do?

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 31 2025 07:25:06
Script start
Timing: Jan 31 2025 07:25:06
Module start 'layout'
Timing: Jan 31 2025 07:25:06
Module start 'content'
Timing: Jan 31 2025 07:25:06
Module end 'content'
Timing: Jan 31 2025 07:25:06
Script end

Main resources:

Total runtime0.0151 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 588.1328151.2109
Module start 'layout' 0.00510.0028 739.343836.6484
Module start 'content' 0.00790.0059 775.992294.2656
Module end 'content' 0.01380.0013 870.257833.9922
Script end 0.0151  904.2500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002616.9224140.0002
Check MTime0.00106.7617140.0001
Mysql Total
Database connection0.00085.007810.0008
Mysqli_queries0.002416.075530.0008
Looping result0.00000.085210.0000
Template Total0.00106.610.0010
Template load0.00074.869010.0007
Template processing0.00031.667210.0003
Override
Cache load0.00053.129310.0005
General
dbfile0.001811.843780.0002
String conversion0.00000.047340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs