WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Why no odd even classes?

[Resolved] Why no odd even classes?

  • When using the default table view for Gravity Forms Directory, no class name is provided to even and or odd lines thus there appears no way of styling alternate row colors as done with most all tables.

    And yes, it can be accomplished with JS or with nth child CSS3 pseudo selectors, but that does not work in all modern browsers.

    Is there a reason why this is not included or how to resolve it?

    On a separate note, when using definition lists there is no way to separate entrys from each other such as a space between one block of entry fields from the next.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Zack Katz

    @katzwebdesign

    In the directory.php file of the plugin, find this line (around line 435):
    $nofollow = ''; if($nofollowlinks) { $nofollow = ' rel="nofollow"'; }

    and add below it:

    if(!isset($evenodd)) { $evenodd = ''; }
    $evenodd = ($evenodd == ' odd') ? ' even' : ' odd';

    On the next line, find:
    class='<?php echo $rowclass;

    and replace with class='<?php echo $rowclass.$evenodd;

    ….And now you’ll have even/odd row functionality.

    Regarding spacing, that’s a CSS issue for now. I’ll consider adding that in future versions, as will I add this functionality to the next update.

    Plugin Author Zack Katz

    @katzwebdesign

    Separating entries can be achieved by defining the rowstyle attribute; you can make modifications like this:

    Instead of [directory form="1"], add a rowstyle with CSS:

    [directory form="1" directoryview="ul" rowstyle="padding-bottom: 1em; border-bottom:1px solid #ccc; margin-bottom:1em;"]

    Plugin Author Zack Katz

    @katzwebdesign

    Well, I just updated the plugin to 2.5.1 which has the alternating rows. Please consider donating for such a quick turnaround 🙂

    Thanks! I must have not signed up for notifications as I just happened to see these after logging into your support again.

    I’ll try out the above this weekend.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Why no odd even classes?’ is closed to new replies.