WordPress.org

Ready to get started?Download WordPress

Forums

WP-Table Reloaded: Merge Cells (4 posts)

  1. sassymonkey
    Member
    Posted 4 years ago #

    I searched about in the plugin Docs and this forum and am surprised to find no mention of merging cells within the fantastic WP-Table Reloaded plugin.

    For example, all I would like to do is create a four column table where every other row spans the four columns (e.g. colspan="4" in alternating row td tags).

    This seems like such a basic need in table design I'm wondering if I'm missing something obvious...? If it's not available, I'd be disappointed as I really like this plugin and cannot use it without colspan capability.

    Thanks for any help.

  2. TobiasBg
    Member
    Posted 4 years ago #

    Hi,

    unfortunately you are not mistaken and I'm sorry to have to disappoint you :-(
    Merging cells (meaning rowspan or colspan) is not possible with my plugin.

    I'd really love to implement this, but I just don't know how, because of the current data structure.

    Best wishes,
    Tobias

  3. sassymonkey
    Member
    Posted 4 years ago #

    Hmm, though I'm not a programmer, wouldn't it be possible to simply add a text field for each cell in the admin section that places any code string within the td tag referenced? It could be like the existing "Custom Data Field" input, only it allows for any code string to be entered for the cell td tag in question.

    Otherwise, it could just be a small number field that is hardcoded to colspan only so that I only type in a number to represent the cols spanned. A second field could be hardcoded to rowspan too.

    This way I could put anything like colspan="4" (or just "4" in the hardcoding case) in the first cell and that would be added as an attribute to the frontend code within the td tag for that cell.

    Incidentally, this would be flexible and allow me to add a colspan attribute to any cell for just spanning 2 cells from cell 1 to 2, but not 3 and 4. Or, spanning 3 cells from 2 to 4 or whatever since each field would have its own colspan (or rowspan) designation.

    SMARTS REQUIRED
    Of course, any remaining td cell output would have to be omitted from the frontend. In other words, if I spanned 4 cols on the first cell, the plugin would have to be smart enough to not add 3 more empty td tags for that row.

    And, ideally, it would be reflected in the admin data entry section too so that either the entry fields are combined into one field (in the case of spanning 4 cols) or at least the remaining fields are disabled. Of course, the admin fields could simply remain as is and the user must be mindful of their own colspan code and not add any data to remaining cell fields for the row.

    Yup, these projects always get complicated! Anyhow, thanks for listening.

  4. TobiasBg
    Member
    Posted 4 years ago #

    Hi,

    thanks for your suggestion. I don't really think that further input fields on the Edit screen will help the cause, as most people will be confused by that. They want a nice and clean interface to easily add data/content to their tables. More options and fields would be harming in for that.
    I really understand your need for colspan and would love to add support for it, but it has to be a very clean and elegant solution.

    Best wishes,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Topic