• Resolved Andrew Leonard

    (@andrewleonard)


    If you look at the page above, you will see there is a very small table that describes the attributes of a fern cultivar. I was thinking of creating a table for each particular cultivar but there may be 100s of them. Another approach would be to have one dynamic table that could insert the content from an external file. Is it possible to change the short code to include a parameter that would be the index to the external file, something like [table id=145 key=”xxx” /]. Or is there a better way of doing this?
    I have written some filters that manipulate the content in a tablepress table

    The page I need help with: [log in to see the link]

Viewing 6 replies - 16 through 21 (of 21 total)
  • Thread Starter Andrew Leonard

    (@andrewleonard)

    I have tried it
    It does not work as expected
    I got the same results when I unchecked “The first row of the table is the table header.”
    This is the code I entered
    [table id=152 filter="FILTER||Grandiceps Fox" table_head=false first_column_th=true /]
    I am not sure I have understood your intentions

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    I meant for you to replace the word “FILTER” with the desired term, i.e. like

    [table id=152 filter="Grandiceps||Cultivar Name" table_head=false first_column_th=true /]
    

    The word “Cultivar Name” in that Shortcode parameter is a constant, basically so that the filter also “finds” the first table row (which contains exactly that word). We achieve that by combining your desired word and this constant word with the || which is an OR filtering.

    Regards,
    Tobias

    Thread Starter Andrew Leonard

    (@andrewleonard)

    I did wonder
    This is the code now:
    [table id=152 filter="Grandiceps Fox||Cultivar Name" table_head=false first_column_th=true /]
    The result is not what I intended
    I did have a problem because I had inserted a new line character betweeen “Cultivar” and “name” so I think it reads it as “Cultivarname” without a space or with a line break inserted in it “<br>”?
    However now all the first column is upper-case and bold
    I would prefer it to look like table 145 – no bold, no uppercase

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    very nice! This is what I had hoped the Shortcode would do ??
    Besides the styling (that we’ll fix in a minute), this also sets the proper HTML code internally, which can be imported e.g. for blind users that use screen reader software.

    So, let’s fix the styling of the first column now. Please add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .tablepress-id-152 .column-1 {
        font-weight: normal;
        text-transform: none;
        border-top: 1px solid #cccccc;
    }
    .tablepress-id-152 .row-1 .column-1 {
        border-top: none;
    }

    Regards,
    Tobias

    Thread Starter Andrew Leonard

    (@andrewleonard)

    Thanks
    That is great
    I have donated to you via PayPal

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    And thanks for the donation, I really appreciate it!

    Best wishes,
    Tobias

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘Dynamic content’ is closed to new replies.