Forums / Developer / problem about attribute_view_gui

problem about attribute_view_gui

Author Message

xiao jc

Monday 24 May 2004 12:15:50 am

  {attribute_view_gui attribute=$Folder:item.object.data_map.image image_class=medium}

if there is a parameter that define the align ?i need the html to be <img src='src' align="left">

Another question:

  {let folder_list=fetch( content, list, hash( parent_node_id, 2, sort_by, array( array( priority ) ),
                                                       limit,1, 
                                                       'class_filter_type',  'include',
                                                       'class_filter_array', array('info_page'),
                                                             ))}
                  {section name=Folder loop=$folder_list}

				  {attribute_view_gui attribute=$Folder:item.object.data_map.image image_class=medium }
                   {/section
        {/let}

how can i get the image's url

thanks in advance

Kåre Køhler Høvik

Monday 24 May 2004 2:31:03 am

1. The following parameters are available, in design/standard/templates/content/datatype/view/ezimage.tpl :

 image_class - Which image alias to show, default is large
 css_class     - Optional css class to wrap around the <img> tag, the
                 class will be placed in a <div> tag.
 alignment     - How to align the image, use 'left', 'right' or false().
 link_to_image - boolean, if true the url_alias will be fetched and
                 used as link.
 href          - Optional string, if set it will create a <a> tag
                 around the image with href as the link.
 border_size   - Size of border around image, default is 0

2. Think it's, $Folder:item.object.data_map.image.medium.full_path , use |attribute(show) to debug image attributes.

--
Kåre Høvik

Kåre Høvik

Muhammad Khalid Majeed

Tuesday 25 May 2004 5:28:34 am

You can try this:

<img src={$Folder:item.object.data_map.image.content[original].full_path|ezroot} class="medium" align="left">

You can get the image url by using {$Folder:item.object.data_map.image.content[original].full_path|ezroot}

Note: You can also pass [small] or [tiny] againt the [orginal]

Muhammad Khalid
Software Engineer
www.webgurru.net

Alexei Novikov

Friday 17 December 2004 2:14:26 pm

I have eZ 3.4.4 and noone of

image_class - Which image alias to show, default is large
css_class - Optional css class to wrap around the <img> tag, the
class will be placed in a <div> tag.
alignment - How to align the image, use 'left', 'right' or false().
link_to_image - boolean, if true the url_alias will be fetched and
used as link.
href - Optional string, if set it will create a <a> tag
around the image with href as the link.
border_size - Size of border around image, default is 0

has any effect on the way the image is displayed - it seems like it uses default "small" and whatever i change it doesn't react. cache cleaned etc.

any suggestions please?

Tore Skobba

Saturday 18 December 2004 2:51:23 am

Have you made your own content/view/ezimage? Check you custom design templates folder (not override)

Note that for {attribute_view_gui .. alignment="left"} you need to have the original EZ css style sheet intact, this as the alignment is done with an css class wrapped around the image.

Try this:

  {attribute_view_gui attribute=$Folder:item.data_map.image image_class="large"}

Does it work better?

Alexei Novikov

Saturday 18 December 2004 5:56:09 am

Well, now I see that problem is much deeper than it appears from the first sight. Finally - I solved the case, but it revealed something for me that makes me now doubt about Ez engine at all. I believe this is wrong topic, but... anyway, I gone though most known major CMS systems (yeah I even did a few sites in Typo3) so it's pretty much not a problem for me to catch up with a new one, also I stick with PHP from the version 3.0.8 - so I "think" I know what php-based CMSs are internally. But this case just made me lost for a few hours wondering around, searching Ez forum, docs and so on. I dont know what's that now, maybe some Ez gurus would explain?

here's a code that finally worked just fine:

{attribute_view_gui image_class=medium attribute=$Article:item.data_map.image.content.data_map.image}

it accepts all the changes I put - image_class, alignments etc w/o a problem. Ie it does display the image, uses my classes when said to, uses href if said... Behaves normally and as expected. So I assume correct object has been passed to attribute_view_gui function.

Now old case:

{attribute_view_gui image_class=medium attribute=$Article:item.data_map.image}

This one DOES display an image, but uses some default way - wraps it with link and shows the caption under it linked to image view, ignores any extra parameters like class, alignment etc. So this one does display an image which seems OK to me and indicates I passed correct object to the function, but obviously - this is wrong and not expected behaviour.

Now - what about the object model at all? Using <b>attribute(show)</b> operator IS useless for above case should I attempt to dig into the object, docs on the site are not mentioning this "feature" at all. How do I - developer should explain above to myself? Or I missed a reference somewhere on the site?

Badger Mushroom

Sunday 23 January 2005 1:15:19 am

Hi, I'm curious...

Where do we find all the values we can use for image_class?

In the gallery demo provided by EZ 3.5, I saw 'imagelarge' & 'gallerythumbnail'. I would like to know where I can set these values.

Also, I would like to know where to find the syntax for attribute_view_gui. 'Function list' mentions this but doesn't provide in-depth usage guide.

For example, most people don't know what follows the 'attribute='. I just followed what the codes inside the EZ 3.5 demo for limited guidances.

{attribute_view_gui image_class=medium attribute=????}

Thanks much.

Frederik Holljen

Sunday 23 January 2005 1:47:08 am

Alexei,

What kind of datatype is your "image" inside the article item?

eZ debug

Timing: Jan 18 2025 18:37:53
Script start
Timing: Jan 18 2025 18:37:53
Module start 'content'
Timing: Jan 18 2025 18:37:54
Module end 'content'
Timing: Jan 18 2025 18:37:54
Script end

Main resources:

Total runtime1.1752 sec
Peak memory usage4,096.0000 KB
Database Queries219

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 587.7188180.8281
Module start 'content' 0.00581.0212 768.5469784.0547
Module end 'content' 1.02690.1482 1,552.6016340.4297
Script end 1.1751  1,893.0313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.3588210.0002
Check MTime0.00170.1447210.0001
Mysql Total
Database connection0.00070.058610.0007
Mysqli_queries1.086992.48882190.0050
Looping result0.00250.21282170.0000
Template Total1.144897.420.5724
Template load0.00210.180220.0011
Template processing1.142797.232120.5713
Template load and register function0.00020.015510.0002
states
state_id_array0.00140.119610.0014
state_identifier_array0.00080.072020.0004
Override
Cache load0.00190.1598610.0000
Sytem overhead
Fetch class attribute can translate value0.00160.134780.0002
Fetch class attribute name0.00130.1123100.0001
XML
Image XML parsing0.00190.161580.0002
class_abstraction
Instantiating content class attribute0.00000.0014100.0000
General
dbfile0.00360.3053320.0001
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
16content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 37
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs