Forums / Setup & design / {section-exclude} with translation

{section-exclude} with translation

Author Message

Selmah Maxim

Tuesday 29 July 2003 7:45:35 am

When click manage to translate the artical and the you select the langauge to translate to you will get form where the 'section-exclude' is doesn`t not working !

I have made this as test :

{section-exclude match=eq($ContentAttribute:translation.contentclass_attribute.identifier,"ad_status")}

this is not working coz the input still there !
BUT :

{section show=eq($ContentAttribute:translation.contentclass_attribute.identifier,"ad_status")}xxxxxxxxxx{/section}

its work and i`ll get the xxx... !!

is this my mistake or bug, or not supported ?!?!
I must hide some options from normal users !

Selmah Maxim

Tuesday 29 July 2003 1:42:57 pm

Hi Jan ..

You modified my topic without answer ... what the meaning of this ? is bug or there is mistake .... can give me some guide line to the solution .. please ?

Jan Borsodi

Tuesday 29 July 2003 1:51:24 pm

I was just moderating the topic text.

Currently I don't have the possibility to test the template function (I'm not at work). You can't expect immediate answers, especially after work hours.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Selmah Maxim

Wednesday 30 July 2003 6:16:26 am

any idea ?!

Selmah Maxim

Thursday 31 July 2003 12:42:51 am

Any Help or comment over here ?!

Selmah Maxim

Thursday 31 July 2003 2:07:45 am

would please test this or give any comment if this bug or my mistake .. any guide line please !

btw. why the svn is not working ..

svn: RA layer request failed
svn: The path was not part of a repository
svn: PROPFIND request failed on '/'
svn: PROPFIND of '/': 405 Method Not Allowed (http://zev.ez.no)

Paul Borgermans

Thursday 31 July 2003 2:31:38 am

svn indeed is down for the moment :-(

When http://zev.ez.no is not working either, you can safely assume it is not your fault.

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Selmah Maxim

Thursday 31 July 2003 2:41:47 am

Paul .. not the svn problem .. would read my 1st msg !
i don`t know if this bug or my msitake '{section-exclude} with translation' !

Jan Borsodi

Thursday 31 July 2003 3:05:56 am

The section-exclude works perfectly in my ezpublish installation (trunk). I can only guess there is a typo somewhere in your code. It's hard to say without the rest of the template code.

The best way to figure this out is to look at the debug and see if you get any errors and warnings. Most of the time you'll get a quicker answer from the debug than from the forums.

And yes the svn is down for the moment.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Jan Borsodi

Thursday 31 July 2003 3:09:53 am

And Selma you won't get a quicker response by posting multiple request for help on the same topic, it only floods the forums with unneeded postings.

I will help out as soon as I can in the forums, but in the last two days I was to busy with a customer project and did not have the time to answer in the forums.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Selmah Maxim

Thursday 31 July 2003 3:20:12 am

Sorry Jab and sorry all if was flooding !
But this what if you upset :(

the section-exclude work fine every in my design, but here dosen`t working, the values all is right, but the different here is .tanslation , not .item !

here the code :

{section name=ContentAttribute loop=$content_attributes sequence=array(divlight,divdark)}
{let translation=$content_attribute_map[$ContentAttribute:item.contentclassattribute_id]}
{section show=$ContentAttribute:translation}
{section show=ne($ContentAttribute:item.view_template,ezheader)}
<div class="divlight">
<label class="FormTextTable">{$ContentAttribute:item.contentclass_attribute.name|wash}:</label>
<input type="hidden" name="ContentObjectAttribute_id[]" value="{$ContentAttribute:item.id}" />
<br>
{/section}
{*this not working*}
{section-exclude match=eq($ContentAttribute:translation.contentclass_attribute.identifier,"ad_status")}
{section-exclude match=eq($ContentAttribute:translation.contentclass_attribute.identifier,"header")}
{*$ContentAttribute:translation|attribute(show)}<hr>*}

{*but this work fine}
{section show=eq($ContentAttribute:translation.contentclass_attribute.identifier,"ad_status")}
Hide IT !!!
{/section}

{attribute_edit_gui attribute=$ContentAttribute:translation style=false()}
</div>
{/section}
{/let}
{/section}

I get this dubeg : Warning
kernel\classes\ezcontentobjecttreenode.php on line 446
and sorry again !

Jan Borsodi

Thursday 31 July 2003 3:42:38 am

The section-exclude statements only work with the last section. This means that if you have a new section inside the other and then put the section-excludes there it won't work. In your code the section-exclude is direct children of
{section show=$ContentAttribute:translation}
which is not a looping section and will just ignore the section-excludes.
To make it work you will need to place the section-exclude outside of this section ie, as a direct child of
{section name=ContentAttribute loop=$content_attributes

or you could use the {section show=...} statement as you have done.

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Selmah Maxim

Thursday 31 July 2003 3:53:43 am

Yes ...

I have tried befor but i forget to change $ContentAttribute:translation to $ContentAttribute:item !

that was easy to wait 3 days for it :D

thanks alot Jan !