Try this:

 

{$marc866.0|getvalue:’a’}

 

(That takes the first element of the marc866 array and then passes it to the getvalue Smarty plug-in, which calls the necessary routines to retrieve the data for subfield a).

 

- Demian

 

From: Harris, Gary [mailto:gary.harris@sebts.edu]
Sent: Monday, February 27, 2012 9:55 AM
To: Vufind-Tech Tech
Subject: [VuFind-Tech] Can't Get to the Data I Need

 

I need to know how to get to the “V. 4 no. 1 (June 2001) in the construct below using Smarty syntax:

 

                    [marc866] => Array

                        (

                            [0] => File_MARC_Data_Field Object

                                (

                                    [ind1:protected] => 3

                                    [ind2:protected] => 1

                                    [subfields:protected] => File_MARC_List Object

                                        (

                                            [tail_node:protected] => File_MARC_Subfield Object

                                                (

                                                    [code:protected] => a

                                                    [data:protected] => V. 4 no. 1 (June 2001)

                                                    [previous:protected] => File_MARC_Subfield Object

                                                        (

                                                            [code:protected] => 8

                                                            [data:protected] => 1.1

                                                            [previous:protected] =>

                                                            [next:protected] => File_MARC_Subfield Object

*RECURSION*

                                                        )

 

                                                    [next:protected] =>

                                                )

 

                                            [current:protected] =>

                                            [root_node:protected] => File_MARC_Subfield Object

                                                (

                                                    [code:protected] => 8

                                                    [data:protected] => 1.1

                                                    [previous:protected] =>

                                                    [next:protected] => File_MARC_Subfield Object

                                                        (

                                                            [code:protected] => a

                                                            [data:protected] => V. 4 no. 1 (June 2001)

                                                            [previous:protected] => File_MARC_Subfield Object

*RECURSION*

                                                            [next:protected] =>

                                                        )

 

                                                )

 

                                        )

 

Many thanks for any clues you can give me!

 

Gary