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?

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.