i've read something about inheritance to be used by fields to field it's value in one of it's ancestors.
Now i've created a macro (Usercontrol) that is provided by a username an password for showing picasa webalbums. the parent page is used for showing all albums. It's child page is used showing photos in the album. Both page should be provided by the same username and password.
The albums pages are provided a username and password by using a pageproperty
Yes, this is possible. There's a reference on the wiki about this, called advanced parameter syntax. You basically want to use a dollar sign instead of a hash in your macro properties, so you'd have:
A dollar sign means that the property is recursive, so if the value isn't set on your current node it traverses up the parent nodes until a value is found.
I have a doc2form macro that I try to do this very thing with and the [$siteEmailAddress] does not traverse up the parent node. At least its not for me. Its rather irritating. I can get the value of the field to display if I do it as a page field like so
inheritance for fields used in macros
Hi All,
i've read something about inheritance to be used by fields to field it's value in one of it's ancestors.
Now i've created a macro (Usercontrol) that is provided by a username an password for showing picasa webalbums. the parent page is used for showing all albums. It's child page is used showing photos in the album. Both page should be provided by the same username and password.
The albums pages are provided a username and password by using a pageproperty
incode:
<umbraco:Macro GoogleUsername="[#googleUsername]" GooglePassword="[#googlePassword]" Alias="picasaGallery" runat="server"></umbraco:Macro>
is it possible to inherit username and password in the child using this kind of syntax?
Kind regards,
Luuk Krijnen
Hi Luuk,
Yes, this is possible. There's a reference on the wiki about this, called advanced parameter syntax. You basically want to use a dollar sign instead of a hash in your macro properties, so you'd have:
A dollar sign means that the property is recursive, so if the value isn't set on your current node it traverses up the parent nodes until a value is found.
Hope this helps...
Dan,
I have a doc2form macro that I try to do this very thing with and the [$siteEmailAddress] does not traverse up the parent node. At least its not for me. Its rather irritating. I can get the value of the field to display if I do it as a page field like so
<umbraco:Item field="siteEmailAddress" recursive="true" runat="server">umbraco:Item>
but when done within the <umbraco:macro FormToEmailAddress3="[$siteEmailAddress]" .............> it does not work
Any ideas?
is working on a reply...