Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: users

Retrieving Parent Fields

 

 

Bricolage users RSS feed   Index | Next | Previous | View Threaded


smith_t at denison

Jul 10, 2008, 12:34 PM

Post #1 of 3 (207 views)
Permalink
Retrieving Parent Fields

How would one go about retrieving the value of a field of its parent
if it is a subelement inside its said parent?

-Trevor


chris.schults at pccsea

Jul 10, 2008, 12:50 PM

Post #2 of 3 (197 views)
Permalink
RE: Retrieving Parent Fields [In reply to]

> How would one go about retrieving the value of a field of its parent
> if it is a subelement inside its said parent?
>
> -Trevor

While I haven't used it, the docs list this as an option:

$parent_element = $element->get_parent

Returns the parent element object.

Source: Bric::Biz::Element

HTH,

Chris


--------------------------------

Chris Schults
Web Developer
PCC Natural Markets
206-547-1222 x104
chris.schults[at]pccsea.com
http://www.pccnaturalmarkets.com

Sign up for PCC Fresh, a monthly newsletter filled with seasonal
recipes, exciting new products, and more:
http://www.pccnaturalmarkets.com/enews


This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.


smith_t at denison

Jul 10, 2008, 12:54 PM

Post #3 of 3 (196 views)
Permalink
Re: Retrieving Parent Fields [In reply to]

Thanks a bunch, don't know how I missed this in the API, but this
worked like a charm :)

$element->get_parent->get_field('date_time')->get_value();

-Trevor

On Thu, Jul 10, 2008 at 3:50 PM, Schults, Chris
<chris.schults[at]pccsea.com> wrote:
>> How would one go about retrieving the value of a field of its parent
>> if it is a subelement inside its said parent?
>>
>> -Trevor
>
> While I haven't used it, the docs list this as an option:
>
> $parent_element = $element->get_parent
>
> Returns the parent element object.
>
> Source: Bric::Biz::Element
>
> HTH,
>
> Chris
>
>
> --------------------------------
>
> Chris Schults
> Web Developer
> PCC Natural Markets
> 206-547-1222 x104
> chris.schults[at]pccsea.com
> http://www.pccnaturalmarkets.com
>
> Sign up for PCC Fresh, a monthly newsletter filled with seasonal
> recipes, exciting new products, and more:
> http://www.pccnaturalmarkets.com/enews
>
>
> This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.
>

Bricolage users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.