Ez Flow manual adding of items and customattributes

Author Message

Lars Eirik R

Tuesday 16 November 2010 5:26:51 am

Hi.

I have now created my own block to be used with the ezflow datatype. Whenever i set my block to not allow manualaddingofitems i am able to use the customattributes of mine.

However if manualaddingofitems = enabled , all customattributes are ignored.

Why is this the case?

I would like to be able to have editors decide on which items to use as well as add some metadata as to where for instance the text is displayed on top of the image)

Is it possible to have customattributes work even though manualaddingofitems = enabled ?

Romeo Antony

Tuesday 16 November 2010 2:26:14 pm

Lars, please post yout block template code here, So I can help you.

Is it a dynamic block or manual block? If it is dynamic block , also post the fetch class

Lars Eirik R

Tuesday 16 November 2010 11:18:34 pm

This is my block

[ArticleGallery]

Name=Article Gallery

ManualAddingOfItems=enabled

CustomAttributes[]=placement

CustomAttributeTypes[placement]=string

ViewList[]=articlegallery1

ViewName[articlegallery1]=Article Gallery

AllowedClasses[]=article

AllowedClasses[]=theme

The problem is that the placement atttribute only shows up if ManualAddingOfItems=disabled

Romeo Antony

Thursday 18 November 2010 11:51:58 am

Hi Lars, I have tried with a custom block with a customattribute and it is working perfect(ezpublish 4.3.0) in both manaual adding items enable and disable condiitions.

Hope some exrerienced hands can help you.

Lars Eirik R

Friday 19 November 2010 2:35:00 am

thanks for the answer.

I will check this further,

I am running version 4.4..

By the way did you try with the example i posted to you? If not could you please post the block config for your customblock..

Lars Eirik R

Friday 10 December 2010 3:39:13 am

[LatestContent]
Name=Latest content
NumberOfValidItems=3
NumberOfArchivedItems=5
ManualAddingOfItems=enabled
CustomAttributes[]=name2
#FetchClass=eZFlowLatestContent
FetchParameters[Source]=NodeID
FetchParametersSelectionType[Source]=single
FetchParametersIsRequired[Source]=true
FetchParameters[Classes]=string
FetchFixedParameters[Limit]=3
ViewList[]=latest_content
ViewName[latest_content]=Latest content

Hi.

I have now tested this a bit more and there seems to be a bug on version 4.4

If the block has a fetchClass setting all customattributes are ignored.

If fetchClass is removed all customattributes are addded.

Does a fix for this exist?

Please anyone from ez?

Update1:

The config below allows me to have custom attributes

[LatestContent]
Name=Latest content
NumberOfValidItems=3
NumberOfArchivedItems=5
ManualAddingOfItems=disabled
CustomAttributes[]=name2
#FetchClass=eZFlowLatestContent
FetchParameters[Source]=NodeID
FetchParametersSelectionType[Source]=single
FetchParametersIsRequired[Source]=true
FetchParameters[Classes]=string
FetchFixedParameters[Limit]=3
ViewList[]=latest_content
ViewName[latest_content]=Latest content

based on this it seems that if manualaddingofitems=disabled and no fetch class has been specificed it works.

The config below ignores custom attributes

[LatestContent]
Name=Latest content
NumberOfValidItems=3
NumberOfArchivedItems=5
ManualAddingOfItems=disabled
CustomAttributes[]=name2
FetchClass=eZFlowLatestContent
FetchParameters[Source]=NodeID
FetchParametersSelectionType[Source]=single
FetchParametersIsRequired[Source]=true
FetchParameters[Classes]=string
FetchFixedParameters[Limit]=3
ViewList[]=latest_content
ViewName[latest_content]=Latest content

The config below ignores custom attributes

[LatestContent]
Name=Latest content
NumberOfValidItems=3
NumberOfArchivedItems=5
#ManualAddingOfItems=disabled
CustomAttributes[]=name2
FetchClass=eZFlowLatestContent
FetchParameters[Source]=NodeID
FetchParametersSelectionType[Source]=single
FetchParametersIsRequired[Source]=true
FetchParameters[Classes]=string
FetchFixedParameters[Limit]=3
ViewList[]=latest_content
ViewName[latest_content]=Latest content

Stefan Eickhoff

Friday 28 January 2011 8:57:40 am

Hi,

check this edit template

extension/ezflow/design/standard/templates/block/edit/edit.tpl

you will see that usage of "manual adding of items" with "custom attributes" is not intended.
But the extensions seems to be capable of handling it.
I just altered the template a bit - yes I do need the very same feature.

Looks as if one could add a lot of versatility just by changing the template and adding more INI-Settings.

Works fine but have to do some more testing.

If you are interested in my attempts I can send you a patch file.

lg

Stefan

Philipp Kamps

Tuesday 15 February 2011 7:17:25 am

I faced the same issue. Thanks for sharing a solution.

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada

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