Skip to content

Releases: medienbaecker/kirby-modules

Kirby Modules 2.9.0

13 Dec 08:51
Compare
Choose a tag to compare
Kirby Modules 2.9.0 Pre-release
Pre-release

This release brings compatibility with Kirby 5, among other things. Here's what I changed:

Compatibility with Kirby 5

Removed styling of inactive items

Previously I was subtly fading out inactive items (status: draft) in the section. This was not compatible with Kirby's new dark theme. In general I think it doesn't make sense to have this special styling when other pages sections don't do that either.

Removed custom URL method

Kirby changed the preview token generation to use the page's URL instead of the id and template. This broke my custom URL method for modules and their containers. Because there's an automatic redirect, I removed the custom URL method without a replacement for now.

Adjustments in Kirby's render functions

I made sure the plugin's custom models are compatible with the core changes, namely the render functions for ModulePage and ModulesPage.

New features

Added icons to the modules section

So far the modules section didn't display the images in the list items because I want to visually differentiate them from pages. Jiří Chlebus gave me the idea to add the icons with a white (or black, depending on the theme) icon instead. By default, the "box" icon is used.

You can now use your controller's variables in modules!

After I rewrote the three renderModules() functions into one simpler function we can now use variables defined in controllers in the modules. This is especially great with a general site controller.

Other adjustments

Changed module creation path

The CLI command kirby make:module was creating modules in site/modules/. Now I'm using the more in-line with blocks structure site/snippets/modules/ and site/blueprints/modules/.

Full Changelog: 2.8.4...2.9.0

Kirby Modules 2.8.4

16 Aug 06:31
Compare
Choose a tag to compare

Thanks to @caplod for making sure the plugin is compatible with kirby-seo ❤️

Kirby Modules 2.8.3

01 Jul 06:53
Compare
Choose a tag to compare

The change in this release allows modules to be moved to other modules containers.

Kirby Modules 2.8.2

25 Jun 07:21
Compare
Choose a tag to compare

Kirby Modules 2.8.1

07 Jun 10:05
Compare
Choose a tag to compare

The status texts are now hidden because they had the word "page" in them.

Kirby Modules 2.8.0

09 May 16:04
Compare
Choose a tag to compare
  • The autopublish option is now using the Kirby 4.0.0 feature.
  • I also automatically set the redirect option to false now and added an option to set it to true again.
  • The modules container page's title is now automatically translated.

Kirby Modules 2.7.0

02 May 13:19
Compare
Choose a tag to compare

🚀 Automatic Slugs

The slug field can now be hidden in the page creation dialog for streamlined entry, thanks to a new feature of Kirby 4.1.0.
For that I introduced a new page method, uniqueModuleSlug(), that ensures slugs are unique by appending a number to duplicates. This feature activates when the medienbaecker.modules.autoslug option is set to true.

Technical Insights:
I had to use a page method instead of a model function because the page isn't recognised as a module at that stage. In the method, $this refers to a temporary page in new/tmp. To effectively check for siblings, I have to go up two levels. I don't know if there's a better approach.

🔄 Template Switching Ease

The plugin now automatically populates the changeTemplate option. This allows easy switching between different module templates.

🔧 Other fixes

  • I've fixed the section headline to be non-clickable following a class name change in a recent Kirby update.
  • The moduleId() function has been updated to use proper BEM syntax, such as module--text instead of module__text.

Kirby Modules 2.6.0

18 Dec 17:26
Compare
Choose a tag to compare

Along with the changes tested in 2.5.1 and 2.5.2 (for a very long time) I made sure Kirby Modules is compatible with Kirby 4.

Kirby Modules 2.5.2

08 Jul 18:12
Compare
Choose a tag to compare
Kirby Modules 2.5.2 Pre-release
Pre-release

It's now possible to pass variables to the renderModules() method.

Kirby Modules 2.5.1

15 May 09:25
Compare
Choose a tag to compare
Kirby Modules 2.5.1 Pre-release
Pre-release

In this release I refactored some things related to the parent page of the module. This should make it possible to use modules in the site/dashboard.

Related: #37, #38