List View - column order

Help
Irish
2009-09-15
2013-05-28
  • Irish
    Irish
    2009-09-15

    I know I've seen this in one of the .php files and I remember thinking it would be easy to re-order the columns in the List view. I've been digging & reading & such most of the day. Could you tell me which file this information is in? Or was I imagining it? Thanks.

     
  • Hi Cindy,

    have a look at variables '$defaultFieldsListViewMajor' and '$defaultFieldsListViewMinor' in file 'initialize/ini.inc.php'. These variables specify the list of fields that will be displayed by default in List view. The order of fields does also define the column order. E.g. if you change the value of variable '$defaultFieldsListViewMajor' from:

        $defaultFieldsListViewMajor = "author, title, year, publication";

    to:

        $defaultFieldsListViewMajor = "year,  author, title, publication";

    the 'year' field will be output as the first column in List view.

    HTH, Matthias

     
  • Irish
    Irish
    2009-09-16

    Thanks for the quick reply, Matthias. That would work perfectly except it's the Links column that I want to move. I tried to add the "file, url, doi" fields and it added the individual fields to the List view. Can the Links column be moved? Thanks again!

     
  • Hi Cindy,

    where do you want the Links column to be? And may I adk for the reasons to reposition the Links column?

    This may be a bit hackish, but if you'd like to put the Links column at the very beginning instead, then open 'search.php', goto function 'displayColumns()', and find the two code blocks that start with this line:

        if (($showLinks == "1") AND ($displayType != "Browse"))

    and select the code up to this comment:

        // Finish the row

    Then move the two code blocks in front of the for-loop that is right above of each of these blocks:

        for ($i=0; $i<$fieldsToDisplay; $i++)

    That should do the trick. Things will be much more tricky (if not impossible) if you want the Links column mixed in between the other columns. But frankly, why would one want to do so?

    HTH, Matthias

     
  • Irish
    Irish
    2009-09-16

    Personally, I love refbase just the way it is. The bibliographer (librarian) who's information I'm putting into refbase is the one wanting all this little picky changes. I'm going to tell her beginning or end - that's your choices. I should be taking it live next week - just before she returns from a month off. Thank you so much for all of your help - you've been awesome. BTW, I wrote a beginning tutorial for my librarian - I'll email you a copy if you'd like. It's full of screen prints & easy to understand language. It mostly focuses on the very basics - seems she was having a hard time sorting & search. Anyway, let me know.

     
  • Hi Cindy, you're welcome.

    Yes, I'd be interested in your beginner's tutorial. You can email it to msteffens -at- refbase -dot- net.

    Thanks, Matthias