• Hi,
    I have a table with large amounts of text, and for better readability I’d like to display each data row as a single table.

    Example:
    This table

    Artist   Album Title    Year  Comment
    AC/DC    Back in Black  1980  Some comment
    AC/DC    Who made Who   1986  Some other comment
    ...

    shall be displayed like this:

    Artist:      AC/DC
    Album Title: Back in Black
    Year:        1980
    Comment:     Some comment
    
    Artist:      AC/DC
    Album Title: Who made Who
    Year:        1986
    Comment:     Some other comment
    
    ...

    Is this possible with WP Table Reloaded plugin?
    Or can this maybe achieved with some CSS hack? (I’m not a CSS expert, so please excuse if this is maybe a silly question)
    If it’s not possible, may I suggest this as a new feature?

    Thanks and best regards,
    Gunnar

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi Gunnar,

    thanks for your question.

    What you are trying to achieve is not possible with WP-Table Reloaded, and I do not intend to add it as a feature. I value your suggestion, but in my opinion, this exceeds the goal and score of the plugin as I see it. The plugin was designed to provide a quick and easy way to display static data in table form.
    Adding capabilities to also work with dynamic data sources would not only make the plugin harder to maintain, but also harder to work with. I also doubt that it would be off a benefit for many users, as it is usually much easier and more reliable to simply use a custom solution (i.e. programming with an own database table) to achieve such dynamic feature.

    A piece of CSS code for this would be quite nice indeed, but unfortunately I’m not aware of such a solution. I could imagine that it’s possible with JavaScript, but then, a solution on the PHP would be much nicer.

    Best wishes,
    Tobias

    Thread Starter gschmid

    (@gschmid)

    Hi Tobias,
    thanks for your quick reply.

    Just to get it right, I’m not intending to display dynamic data. Entering the data into the backend (as it is done now) is just fine.

    My question ist only about the way to display it on a page, i. e. not one row per record (like in a “normal” table”, but multiple lines or even a table per record, just to have a nice formatting (and yes, with redundant labels).

    Best regards,
    Gunnar

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Gunnar,

    yes, I understand what you mean. With “dynamic” I did not mean to refer to the actual data, but more to the process of displaying it. Basically you just want to use WP-Table Reloaded as a data storage with a custom form of displaying the data from it, and I would describe that as “dynamic”. However, exactly that is not possible with the plugin, because there is no “query language” to extract the data from the table to “dynamically” re-structure it in a different layout. Instead, you should use a custom mySQL table and some PHP code, as they offer that functionality. Another idea might be to use a plugin filter and (by a custom WordPress plugin) rewrite the table output to a custom format. That would require some text replacing and maybe regular expressions.

    Regards,
    Tobias

    Thread Starter gschmid

    (@gschmid)

    OK, got it.

    Probably a custom post type could help me here, but I haven’t found the right plugins to display that either, so far.

    Anyway thanks again,
    Gunnar

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Gunnar,

    indeed, Custom Post Types could also be an option. Then you would create a new post for each album, where the album data (title, artist, year, etc.) ist stored as “meta data” in “custom fields” for each post.
    Displaying the posts is then done within “The Loop”.
    However, you are likely not going to find a readily usable plugin for that, but you will need to develop a custom plugin that creates the Custom Post Type. For a start, I suggest this article: http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress

    Best wishes,
    Tobias

    Thread Starter gschmid

    (@gschmid)

    Creating the custom post types is rather easy with plugin “Custom Post Types UI” (http://wordpress.org/extend/plugins/custom-post-type-ui/), but I’m still looking for a convenient way to display this types (ideally without additional coding). I suppose I’ll better ask in their forum. 🙂

    Thx,
    Gunnar

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    nice plugin, thanks for the hint!

    You won’t have so much luck with the actual displaying of the posts though. As far as I understand Custom Post Types, a plugin can not really show the posts somewhere without the theme being modified to also include the new Custom Post Type in its “Loop”. Also, you will have to write some code, so that your post meta data is displayed as a table.

    Best wishes,
    Tobias

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: WP-Table Reloaded] displaying a table per data row’ is closed to new replies.