From: Christian D. <dab...@fh...> - 2013-04-12 16:05:04
|
the var_dump shows that the data is complete, so I changed the entry from {$row.holdingsZSSSGN|escape}<br/> into {$holdingsZSSSGN|escape}<br/>. Now it works! Thanks! Christian Am 12.04.2013 17:13, schrieb Demian Katz: > I don't see anything obviously wrong with this, but maybe a good place > to start debugging would be to add: > > var_dump($this->getZSSSGN()); > > above your $interface->assign() statement. > > This will dump out the array at the top of the screen -- it will at > least confirm whether your problem is > > a) getZSSSGN() is only returning one value > > or > > b) getZSSSGN() is returning multiple values, but your template is only > displaying one > > Once you figure out which is the issue, it should be easier to narrow > in on a solution. > > Feel free to share more details after trying this! > > - Demian > ------------------------------------------------------------------------ > *From:* Christian Dabrowski [dab...@fh...] > *Sent:* Friday, April 12, 2013 10:36 AM > *To:* vuf...@li... > *Subject:* [VuFind-General] show Data in Holdings Tab > > Hi all, > > I would like to display data from a solr field in the holdings tab > (solr is populated). For this I have done the following: > > I created the function in IndexRecord.php > > protected function getZSSSGN() > { > return isset($this->fields['signatur-zss']) ? > $this->fields['signatur-zss'] : array(); > } > > > and I assigned it in IndexRecord.phpinto "public function > getHoldings($patron = false)" > $interface->assign('holdingsZSSSGN', $this->getZSSSGN()); > > In the holdings.tpl I entered this: > > <table> > {if !empty($holdingsZSSSGN)} > <tr valign="top"> > <th>{translate text='Call Number ZSS'}: </th> > <td> > {foreach from=$holdingsZSSSGN item=row name=loop} > {$row.holdingsZSSSGN|escape}<br/> > {/foreach} > </td> > </tr> > {/if} > </table> > > > The translate text is shown correctly but my problem is that only the > first value of the field is visible. Does somebody has a hint where to > look at? > > Christian |