Skip to content

I fixed the plugin :D#7

Open
reisir wants to merge 6 commits into
finanalyst:masterfrom
reisir:master
Open

I fixed the plugin :D#7
reisir wants to merge 6 commits into
finanalyst:masterfrom
reisir:master

Conversation

@reisir

@reisir reisir commented Dec 30, 2023

Copy link
Copy Markdown

Fixes #6

The only thing required to fix #6 is adding |raw in the twig template. That's it. Four characters. I did a bunch of other stuff while figuring this out. If there's too much stuff and you don't feel like pulling this I can make a simpler PR with less changes.

Changelog:

  • Ran a formatter on the changed files
  • Declared all dependencies (and added tested versions)
  • Refactored id extraction and insertion
  • Now handles invalid id from shortcode eg. grav-id="id with spaces". It generates a new id if the one in parameters is invalid.
  • Add support for id shortcode parameter while keeping backwards compatibility with grav-id
  • Prioritize the id passed through parameters. If there's an id in the shortcode content AND in the parameters, the id is replaced with the one in the parameters.
  • Used twig |escape('js') to escape the options for DataTable. This in combination with JSON parsing the options allows passing more complicated options than just true / false
  • And of course used |raw in the template to output the table as HTML

@FravBox

FravBox commented Feb 19, 2026

Copy link
Copy Markdown

Any chance you'll ever merge this? @finanalyst
This fix has been working for me since it was written

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin does not work at all

2 participants