Loading...
 
Features / Usability

Features / Usability


[solved] Do I have to write my own {TABLE} plugin for colspan and rowspan to work?

posts: 55

These are my goals:

  • Wiki-style user-editable tables
  • Colspan and rowspan wherever I like, like this:

Bild

Tiki only supports colspan at the end of the row, which is not helpful. {FANCYTABLE} is not much better. At least this is the case in Tiki 21 LTS.

I do not want to use html (and use html tables directly) as this is not safe for anonymous. Or is it doable in a safe way?

Do I really have to use screenshots of Mediawiki-tables and scrap my first goal? Or do I have to write my own {TABLE}-plugin? If so, please show me the right way to do it/begin. I am a software developer (not a web developer, but I used php before, everything can be learned), but I am completely new to Tiki. I use Tiki 21 LTS on my own server and have full access.

posts: 126885 United Kingdom

Hi @FootlooseTraveller

Interesting and really good question!

Starting a new table plugin/syntax would certainly be an option (it's the "wiki way"), but i think it would be better to add new functionality to the existing wiki table syntax, and/or the {FANCYTABLE} plugins.

Doesn't this approach in fancytable almost do what you need already?

Another thought to bear in mind is that we have a long term goal to move to markdown eventually, as planned here WYSIWYG and Markdown, so maybe it's worth seeing how md does this? (if it does)

posts: 55

Hi @Jonny Bradley,

thanks for your quick response!

FANCYTABLE

Try fixing this table:

  • First and third columns should span over all rows
  • The last cell in each row should span over both last columns

{FANCYTABLE( head="Land|Fahrzeuge|Innerorts|Außerorts|Schnell/Expressstraße|Autobahn")} \\Deutschland|PKW und Fahrzeuge < 3,5 t|50 km/h|100 km/h|∞ 3,5 t bis < 7,5 t ausgenommen PKW| |80 km/h|80 km/h%%%Wohnmobil: 100 km/h {FANCYTABLE}

Land Fahrzeuge Innerorts Außerorts Schnell/Expressstraße Autobahn
Deutschland PKW und Fahrzeuge < 3,5 t 50 km/h 100 km/h
3,5 t bis < 7,5 t ausgenommen PKW 80 km/h 80 km/h
Wohnmobil: 100 km/h


In my opinion, this is not even possible to describe with this syntax.

Markdown

If I understand it right, Markdown is just another wiki syntax to use. I briefly consulted the Markdown specification and found only html tags with my full text search for "table" - so I guess it is not covered.

My Approach

Based on these two fails and the general direction of thoughts in your post, I would either add to the simple tiki table syntax (no further thouhts on how to do that so far), to the FANCYTABLE syntax, or build my own syntax (maybe {TABLE}?) - whatever is easiest for me as a beginner. If I add to tiki table syntax or FANCYTABLE, I would love to commit my changes to tiki 24 LTS, if wanted.

Can you help me gettin started with it, i. e. point to the files I need to have a look at?


posts: 126885 United Kingdom
Sorry, out of time for forum, stuff for today, not forgotten this one though...
posts: 55
Don't worry, it's not an easy one! Thanks for the info though!

posts: 55

Hi @Jonny Bradley,
I just found the source code of {FANCYTABLES}. There I found, that it already fully supports rowspan and colspan. It is just not well documented. I will add to the documentation.

If a cell begins with a number of \, this cell is rowspanned to the followin number of rows. Define lower number of cols in the following rows.
If a cell begins with a number of /, this cell is colspanned to the followin number of cols. Define lower number of cols in this row.

posts: 126885 United Kingdom

Brilliant, nice find!

(personally i use the source for most of my working out of how things work in Tiki, when i started the documentation was pretty well non-existent)

Looking forward to your first merge request! cool

jonny


Upcoming Events

1)  21 Mar 2024 18:00 GMT-0000
Tiki Roundtable Meeting
2)  18 Apr 2024 18:00 GMT-0000
Tiki Roundtable Meeting
3)  16 May 2024 18:00 GMT-0000
Tiki Roundtable Meeting
4)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
8) 
Tiki birthday
9)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  21 Nov 2024 15:00 GMT-0000
Tiki Roundtable Meeting