hide empty fields in result search page

  • roberto

    roberto - 2012-07-22

    Hi all
    I'd like to hide empty fields in result search page. I mean the page displaying the full record.
    The filtering should operate only when results fetched from DB are effectively empty, otherwise fields names and content should be visible.
    e.g.: Record1 has no 'abstract' informations, for Record1 the field in the view should disappear
    Record2 has its own 'abstract', in this case field name and the content should be visible.
    best regards

  • Matthias Steffens

    Hi robmor,

    I'd like to hide empty fields in result search page. I mean the page displaying the full record.

    I understand your request. However, it will be difficult to achieve this with the current design and method of construction of the Details view page.

    That said, you could rather easily adopt the Citations view so that the additional info section (which is displayed when clicking the triangle widget underneath each citation) displays all of the fields that have content.

    By default, this section does only display fields with content. So you could simply enter all field names in variable '$additionalFieldsCitationView' (in file 'initialize/ini.inc.php') that you wish to get displayed (if not empty).

    You could also specify the Citations view as the default view that is displayed for found results. To do so, set variable '$defaultView' (again, in file 'initialize/ini.inc.php') to "Cite". Furthermore, if you want to hide the current Details view completely, you could login as admin and uncheck the checkbox next to "Details view" in the "User Permissions" section of each user's options page.

    While the additional info sections are hidden initially on search results pages, it shouldn't be too difficult to display these sections by default. This would require some code modifications, though.

    HTH, Matthias


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks