Author
|
Message
|
Gerhard Hoogterp
|
Tuesday 18 February 2003 6:15:32 am
Next problem: I show userdata. Added some extra fields to the userclass. No problem there. But now I want to show the user's email. This is part of the user_account field. {attribute_view_gui attribute=$content_version.data_map.user_account}
Show's me a complete block for username/email. What should I add the to the user_account to get ONLY the email address? The obviouse sollutions ($content_version.data_map.user_account.email in a number of spellings) doesn't work. As a sidenote: I would give a lot for a template function like: {debug print_r $node} to help in the endless search for spellings and names. If you though old adventuregames were bad... Thanks.
|
Jan Borsodi
|
Tuesday 18 February 2003 8:49:18 am
> Next problem:
>
> I show userdata. Added some extra fields to the userclass.
> No problem there. But now I want to show the user's email.
> This is part of the user_account field.
>
> {attribute_view_gui
> attribute=$content_version.data_map.user_account}
>
> Show's me a complete block for username/email. What should I
> add the to the user_account to get ONLY the email address?
> The obviouse sollutions
> ($content_version.data_map.user_account.email in a number > of spellings) doesn't work. You need to add content after the attribute name, the content will either return a single, an array or an object depending on the datatype. eZ user will return an eZUser object.
Try: {$content_version.data_map.user_account.content.email}
> As a sidenote: I would give a lot for a template function
> like:
> > {debug print_r $node}
You can use the attribute operator.
{$node|attribute(show)} The show parameter tells it to show the attribute values. Remember that the operator will expand any array or objects attributes recursively (max at 10 by default) so you generally want to use |attribute(show,1) for if you just want to show content of one variable.
--
Amos
Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq
|
Gerhard Hoogterp
|
Tuesday 18 February 2003 12:03:39 pm
{$content_version.data_map.user_account.content.email} I was sure I tried thatone too since I got it working with $node.data_map.etc. But appearantly not..
> You can use the attribute operator. > {$node|attribute(show)} Ah, bravo. But on an other sidenote, what's the logic with the | ? I have an other problem now: there is the eq() operator but not an unequal operator. No problem, not() is to the resque. But where does it go?? Or how? Example: {section show=$node.node_id|eq(21)} Where does the not() go so the section is shown when the node_id!=21 ? (and more important: WHY?)
|
Bruce Morrison
|
Tuesday 18 February 2003 11:43:27 pm
> {$content_version.data_map.user_account.content.email}
>
> I was sure I tried thatone too since I got it working with
> $node.data_map.etc. But appearantly not..
>
> > You can use the attribute operator.
> > {$node|attribute(show)}
>
> Ah, bravo. But on an other sidenote, what's the logic with
> the | ? I have an other problem now: there is the eq()
> operator but not an unequal operator. No problem, not() is
> to the resque. But where does it go?? Or how?
>
> Example:
> > {section show=$node.node_id|eq(21)} for equals you would write the above like {section show=eq($node.node_id,21)}
>
> Where does the not() go so the section is shown when the > node_id!=21 ? (and more important: WHY?) {section show=ne($node.node_id,21)} See http://sdk.ez.no/sdk/eztemplate/view/operator_list/ for a full operator list You should have a look through the documentation! ;)
Cheers bruce
My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish
|
Gerhard Hoogterp
|
Wednesday 19 February 2003 3:19:39 am
> See http://sdk.ez.no/sdk/eztemplate/view/operator_list/ for a full operator list
> > You should have a look through the documentation! ;) Well, I have.. and while there's still a lot of improvents possible there (especialy in the examples and the logical connections between pieces part!) I usualy find what I'm searching for.
But.. check for yourself. The ne() operator is NOT mentioned on that page. That's why I ended with the not(eq( )). And while you solved my problem, you didn't realy answer my question on how to combine logical operators since I did try the not(eq($node.node_id,21)) and got no usable results. Anyhow, as said, my direct problem is solved so onwards we go!
Thanks, Gerhard
|
Gerhard Hoogterp
|
Wednesday 19 February 2003 4:04:54 am
> Some advice for missing functionality or documentation of
> the template engine: try to look in the eztemplate*.php
> scripts, in ./lib/eztemplate/classes. Most of them contain > information on the available functions and usage! Been there too (although not for this problem) point is that for the most basic template things there are a number of places to search. The demo-site, the sdk - common template issues. The sdk -eztemplate docu and the source. But. the source has a lot of files and finding the right file to check is a task in itself. As i realize that this is an rc2 and not a final product I take it in good spirit, but trying to sort out how things are working is taking way to much time and is something that I hope will be addressed for the final version.
Actualy the organisation of the forum and bugpages are not very helpfull either as all ez3 is thrown in a pile and the bugs range from beta1 to rc2 with no easy way to filter all the old stuff or search only the current forum. Creating a community around an open source product also means providing an environment in which the community can trieve and grow. But then again, maybe I'm just spoiled by bugzilla, sorceforge and the kde supportsystems. At least ez3 feels like it's worth the efford to sort things out and get an headstart for when the final is here..
Anyhow, thanks for the pointers. Gerhard
|
Karsten Jennissen
|
Wednesday 19 February 2003 4:40:38 am
> > Some advice for missing functionality or documentation
> of
> > the template engine: try to look in the eztemplate*.php
> > scripts, in ./lib/eztemplate/classes. Most of them
> contain
> > information on the available functions and usage!
>
> Been there too (although not for this problem) point is that
> for the most basic template things there are a number of
> places to search. The demo-site, the sdk - common template
> issues. The sdk -eztemplate docu and the source. But. the
> source has a lot of files and finding the right file to
> check is a task in itself.
>
> As i realize that this is an rc2 and not a final product I
> take it in good spirit, but trying to sort out how things
> are working is taking way to much time and is something that
> I hope will be addressed for the final version.
>
> Actualy the organisation of the forum and bugpages are not
> very helpfull either as all ez3 is thrown in a pile and the
> bugs range from beta1 to rc2 with no easy way to filter all
> the old stuff or search only the current forum.
> Creating a community around an open source product also
> means providing an environment in which the community can
> trieve and grow.
>
> But then again, maybe I'm just spoiled by bugzilla,
> sorceforge and the kde supportsystems. At least ez3 feels
> like it's worth the efford to sort things out and get an > headstart for when the final is here.. Have to say I agree with you completely. The ez crew have said that with version 3 there will be a new community site that much better than the current one. I don't know how far this is off, but I'd think it should be online with the final at the latest.
<shameless plug>
Meanwhile, take a look at http://ezwiki.blanko.info and if you find things out, please contribute so that others benefit from it, too. The Wiki works around some of the shortcomings of this forum. Collected documentation will be moved to the user area of the new community site, once it's up in some form, so your efforts will not be lost. Thanks a lot. </shameless plug> Karsten
|
Gerhard Hoogterp
|
Wednesday 19 February 2003 5:09:37 am
> Meanwhile, take a look at http://ezwiki.blanko.info and if
> you find things out, please contribute so that others
> benefit from it, too. The Wiki works around some of the
> shortcomings of this forum. Collected documentation will be
> moved to the user area of the new community site, once it's
> up in some form, so your efforts will not be lost. Thanks a > lot. Like so many others I'm better in getting in to trouble than in writing down a decent way to solve things. But I might give writing a try one of these days. For now I'm still to much into the sorting out fase myself..
Thanks, Gerhard
|
Gerhard Hoogterp
|
Wednesday 19 February 2003 5:11:14 am
> Meanwhile, take a look at http://ezwiki.blanko.info and if
> you find things out, please contribute so that others
> benefit from it, too. The Wiki works around some of the
> shortcomings of this forum. Collected documentation will be
> moved to the user area of the new community site, once it's
> up in some form, so your efforts will not be lost. Thanks a > lot. Like so many others I'm better in getting in to trouble than in writing down a decent way to solve things. But I might give writing a try one of these days. For now I'm still to much into the sorting out fase myself..
Thanks, Gerhard
|