Skip to main content
4 votes
Accepted

Adding Columns to a table

With the supercool table maker you can create dynamic tables. Is this what you are looking for?
Robin Schambach's user avatar
4 votes

Is there a better way to make tables in Craft?

I'd use a Table or SuperTable field But if you want to stick to a Redactor Rich Text field, put a wrapper <div> around the {{ entry.redactorField }} Twig markup, and use CSS to style the table ...
andrew.welch's user avatar
  • 11.6k
3 votes

Redactor settings: stripping out classes from table

If all your tables should use the same class or classes, you could use my Retcon plugin to add the classname(s) in Twig: {{ entry.body|retconAttr('table', {class: 'someclassname'}) }} If different ...
Mats Mikkel Rummelhoff's user avatar
2 votes

Multiple editableTable in a CP page

I think you are looking for a plugin called Table Maker. I've never tried it but it looks like it lets your users create tables in the cp. Table Maker
AbbeyDesign's user avatar
  • 1,527
2 votes

how to create a new table in database

Not sure I'm following 100%, but in Craft 3, you can add the code necessary to create the new table in your plugin's Install migration. That will run every time someone does a fresh installation of ...
Brad Bell's user avatar
  • 67.5k
2 votes

Adding Columns to a table

I used the method described here: "A User-Friendly Table Field" http://www.drivesimplicity.com/blog/a-user-friendly-table-field -- instruct the user to leave columns that he/she doesn't want blank and ...
userAW's user avatar
  • 176
2 votes
Accepted

Cannot hide redactor strikethrough button when table plugin is enabled

The name to use to hide the Strikethrough button is deleted.
Oli's user avatar
  • 7,495
2 votes
Accepted

Conditionals and outputting tables

Assuming your example code, something along these lines will help... {% if entry.yourTable | length %} <table> {% for row in entry.yourTable %} <tr> <td>{{ row....
Steve Holland's user avatar
1 vote
Accepted

Use table prefix after installation

You would only need to add a prefix if you were planning on multiple installs of Craft on the same DB, most likely you are not so you can just leave it blank. You don't need seperate DBs for a multi-...
Seth Warburton's user avatar
1 vote
Accepted

Why is my redactor table converted to a text when saving?

I finally found the solution: I was running HTML Purifier on my Redactor Fields and had to allow the table tags in my config/htmlpurifier/Default.json like this: "HTML.Allowed": "img[...
Droemmelbert's user avatar
1 vote

Table Field fixed column content(placeholder) for all entries

You can set default field values in Settings → Fields → your table field. Scroll down on the page and you will see a Default Values section (docs). Add the rows/values you need, save your field and ...
Oli's user avatar
  • 7,495
1 vote

Allow Author to Build Multiple Choice Question?

There isn't a field type or plugin I know of that will let an admin choose only 1 correct answer. One possibility would be to number the correct answer in another field like piotrpog suggests. I ...
Alex Roper's user avatar
  • 2,642
1 vote
Accepted

How to tell whether a SuperTable column has data or is empty?

I forget who solved this for me! I think it was Michael van Dorth. <div class="table-overflow content-row"> <table class="table {{ table_class }}"> {# Caption #} {% if ...
Katie Fritz's user avatar
1 vote

Access table from Globals in script

If you want to get the values of your global table field, you need to loop through it. somewhere in a template: {% js %} var table = ' {% for row in global.tableFieldName %} ({{ row....
Marten Brosch's user avatar
1 vote

Loop by column from a table

Is this what you're after? {% for row in block.tableHandle %} {% for columnHandle, columnValue in row %} {# If not col1 #} {% if loop.index != 1 %} <p>Do ...
Wei's user avatar
  • 459
1 vote
Accepted

Redactor advanced table formatting?

There is a tables plugin for Redactor, to easily create tables direct in the editor. On top of that, I think I'd approach this using the Redactor Clips plugin to pre-create a number of tables that ...
Seth Warburton's user avatar
1 vote

Templating SuperTable

There are a few templating examples via the documentation - https://verbb.io/craft-plugins/super-table/docs/guides/templating-examples But as @carlcs states, I believe the issue is that you're ...
crawf's user avatar
  • 3,562

Only top scored, non community-wiki answers of a minimum length are eligible