Bootstrap-table: Combine multiple attributes in data source to show in 1 cell

Created on 13 Mar 2018  路  2Comments  路  Source: wenzhixin/bootstrap-table

I have this data source:

[
    {
        "product_url": "https://link1",
        "product_image": "https://image1",
        "product_name": "Product name 1"
    },
    {
        "product_url": "https://link2",
        "product_image": "https://image2",
        "product_name": "Product name 2"
    },
    {
        "product_url": "https://link3",
        "product_image": "https://image3",
        "product_name": "Product name 3"
    }
]

I want to show rows with 2 columns, 2 cells per row. In first cell, it should show product_image and hyperlinked by product_url. In 2nd row, it should show product_name.
How to do that in first cell? Thanks

Most helpful comment

Use the data-formatter. You can combine fields using the row parameter. Here is an example of a few fields combined in various ways in the first column.

All 2 comments

Use the data-formatter. You can combine fields using the row parameter. Here is an example of a few fields combined in various ways in the first column.

Thanks. You saved my day.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

btran1802 picture btran1802  路  30Comments

simkeyur picture simkeyur  路  19Comments

Valery1991 picture Valery1991  路  31Comments

jesussuarz picture jesussuarz  路  17Comments

thongkekienthuc12 picture thongkekienthuc12  路  16Comments