how to increase column-width, in the display of list of sets

In Providence, I need to increase the width of the Name column in the display of list of my sets [I have attached an image to illustrate my problem]. How can I do that?

1920 x 1080 - 6M


  • edited April 29

    Hi Parasmoni,

    You cannot change this, except if you edit the /themes/default/views/manage/set_list_html.php file (in Providence of course) (or replace default by the name of your theme if you have a customized one).

    I see multiple solutions to improve the display in your case:

    1. Modify the HTML display code of the table (increase the width of the column for example).
    2. Reduce the data size in some columns.
    3. Hide/Delete some columns that are of little use to you, to allow other columns to be larger.
    4. Fuse 2 columns (for example the name and the type of content).

    Make a copy of this file, in case you break something...

    For solution #1:

    Depending of your version, but for me, it's at line 96:

                <th class="<?php print (($vs_current_sort == "name") ? "list-header-sorted-".$vs_current_sort_direction : ""); ?> list-header-nolink">

    Just add a directive to increase width (40% or as you like):

                <th style="width:40%" class="<?php print (($vs_current_sort == "name") ? "list-header-sorted-".$vs_current_sort_direction : ""); ?> list-header-nolink">

    For solution #2:

    Go to line 133:

                   <div class="caItemListName"><?php print $va_set['name'].($va_set['set_code'] ? "<br/>(".$va_set['set_code'].")" : ""); ?></div>

    Add some HTML tag (<small>...</small> to reduce the size of this block. For exemple replace the above line by:

                   <div class="caItemListName"><small><?php print $va_set['name'].($va_set['set_code'] ? "<br/>(".$va_set['set_code'].")" : ""); ?></small></div>

    You can also remove the email corresponding to owner's set. For this, replace line 161:

    <div class="caItemListOwner"><?php print $va_set['fname'].' '.$va_set['lname'].($va_set['email'] ? "<br/>(<a href='mailto:".$va_set['email']."'>".$va_set['email']."</a>)" : ""); ?></div>


                   <div class="caItemListOwner"><?php print $va_set['fname'].' '.$va_set['lname']; ?></div>

    For solution #3:

    You have to comment the HTML lines for the header of column you want to hide, and also comment those for data.

    Suppose you want to hide the column showing the Status of the sets (for me, this Status is always "new"...), so you have to comment (or delete!) lines 120 to 122:

                <th class="<?php print (($vs_current_sort == "status") ? "list-header-sorted-".$vs_current_sort_direction : ""); ?> list-header-nolink">
                   <?php print caNavLink($this->request, _t('Status'), '', 'manage', 'Set', 'ListSets', array('sort' => 'status', 'direction' => ((($vs_current_sort == "status") && ($vs_current_sort_direction != "desc")) ? "desc" : "asc"))); ?>

    Juste add <!-- and --> like this:

    <!--            <th class="<?php print (($vs_current_sort == "status") ? "list-header-sorted-".$vs_current_sort_direction : ""); ?> list-header-nolink">
                   <?php print caNavLink($this->request, _t('Status'), '', 'manage', 'Set', 'ListSets', array('sort' => 'status', 'direction' => ((($vs_current_sort == "status") && ($vs_current_sort_direction != "desc")) ? "desc" : "asc"))); ?>
                </th>  -->

    So you have to comment also lines 165 to 167:

                   <div><?php print $t_set->getChoiceListValue('status', $va_set['status']); ?></div>

    change to

    <!--            <td>
                   <div><?php print $t_set->getChoiceListValue('status', $va_set['status']); ?></div>
                </td>  -->

    For solution #4:

    For example, your want to hide the column Content type, but move this information in the column Name on new line.

    Comment the lines 99 to 101 and 135 to 137.

    Copy the <?php print $va_set['set_content_type']; ?> in the line 133. You can also put <small>...</small> if you want. This will give:

                   <div class="caItemListName"><small><?php print $va_set['name'].($va_set['set_code'] ? "<br/>(".$va_set['set_code'].")" : ""); ?><br/>[<?php print $va_set['set_content_type']; ?>]</small></div>

  • Here are screen captures before and after applying these 4 solutions simultaneously! 😉

    1508 x 368 - 102K
    1508 x 368 - 89K
  • Thanks a lot darrigan for your detailed illustration. I will explore your options. Right now, I am away from my office.

  • Solution #1 delivered nicely what I wanted.

    Thank you darrigan once again for this detailed reply.

Sign In or Register to comment.