eZ Community » Forums » Developer » Ez Flow manual adding of items and...
expandshrink

Ez Flow manual adding of items and customattributes

Ez Flow manual adding of items and customattributes

Tuesday 16 November 2010 2:26:51 pm - 7 replies

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 ?

Tuesday 16 November 2010 11: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

Modified on Tuesday 16 November 2010 11:27:28 pm by Romeo Antony

Wednesday 17 November 2010 8:18:34 am

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

Thursday 18 November 2010 8:51:58 pm

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.

Friday 19 November 2010 11: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..

Modified on Friday 19 November 2010 12:01:37 pm by Lars Eirik Roenning

Friday 10 December 2010 12:39:13 pm

[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

Modified on Friday 10 December 2010 1:10:25 pm by Lars Eirik Roenning

Friday 28 January 2011 5:57:40 pm

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

Tuesday 15 February 2011 4:17:25 pm

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

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from