From: Demian K. <dem...@vi...> - 2012-10-02 13:15:05
|
I'm moving this to the tech list since it is fairly technical in nature. The assignment of the $hasTOC variable takes place in web/services/Record/Record.php (which is the base class of most of the record-related actions): $interface->assign('hasTOC', $this->recordDriver->hasTOC()); ...so assuming that you haven't changed that code, and you haven't changed a subclass so that it fails to inherit from Record, and the correct record driver is being loaded, and the correct field(s) are either indexed or found in the MARC record to support the record driver's hasTOC method, it should be working. But that's a lot of assumptions -- hopefully you can test them up the chain by putting in appropriate echo statements until you find where something is breaking. Perhaps especially significant: the web/RecordDrivers/MarcRecord.php driver (which should be loaded for all record drivers) doesn't actually check the Solr index in its hasTOC() method. Instead, it looks directly at the full MARC record to check for a 505 field. So even if your indexing is incorrect, you should be seeing the tab if there is a 505 field in the MARC record! Perhaps it would be helpful to look at the "staff view" tab of a record where you expect to see a TOC. If you see a 505 field there but no tab, something very strange is going on in the code -- you might want to debug MarcRecord::hasTOC to see why it is failing. If you don't see a 505 field there, then perhaps something is going wrong in the indexing process that is corrupting the stored MARC record (though this seems very unlikely to me). I hope this is helpful -- if you're still stuck, feel free to share whatever new clues you have found along the way of debugging. - Demian > -----Original Message----- > From: Karla Smith [mailto:sm...@wi...] > Sent: Monday, October 01, 2012 4:49 PM > To: vuf...@li... > Subject: [VuFind-General] TOC tab > > Hi, > What determines whether the TOC tab displays on the record? > > I found this in themes/winnefox/Record/view.tpl: > {if $hasTOC} > <li{if $tab == 'TOC'} class="active"{/if}> > <a href="{$url}/Record/{$id|escape:"url"}/TOC#tabnav">{translate > text='Table of Contents'}</a> > </li> > {/if} > > And I found the hasTOC() function in IndexRecord.php. I see that contents = > 505a:505t in marc.properties. > > However, we're not seeing any TOC tab--we're not seeing any contents > displaying on the Record page at all--even though we have many records with > contents listed in the 505 field. > > Is there a config setting somewhere I missed? > > Could I have accidentally removed/changed whatever it is that tells view.tpl > that the $hasTOC value is true? > > Thanks, > --Karla > > ------------------------------------------------------------------------------ > Got visibility? > Most devs has no idea what their production app looks like. > Find out how fast your code is with AppDynamics Lite. > http://ad.doubleclick.net/clk;262219671;13503038;y? > http://info.appdynamics.com/FreeJavaPerformanceDownload.html > _______________________________________________ > VuFind-General mailing list > VuF...@li... > https://lists.sourceforge.net/lists/listinfo/vufind-general |