Download the PHP package yoanmalie/kirbytextwrap without Composer
On this page you can find all versions of the php package yoanmalie/kirbytextwrap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yoanmalie/kirbytextwrap
More information about yoanmalie/kirbytextwrap
Files in yoanmalie/kirbytextwrap
Package kirbytextwrap
Short Description Kirby plugin to get rid of the kirbytext()
enclosing tag, or replace them and add HTML attributes. It Keep the kirbytag working.
License
MIT
Informations about the package kirbytextwrap
KirbytextWrap plugin for Kirby
Kirby Plugin to remove or replace the <p> </p>
enclosing tag and set HTML attributes. This will keep your kirbytag working.
Support both Kirby 2 and Kirby 3 version!
How it works?
In your template, $page->title()->kirbytextWrap()
will give you the same as kirbytext() without the <p>
enclosing tag. This work also with the short ktw()
alias.
Do much more
$page->title()->kirbytextWrap('h1')
Will replace the <p>
enclosing tag by <h1>
.
$page->title()->kirbytextWrap('h1', ['class' => 'title'])
Will replace the <p>
enclosing tag by <h1>
and add a class attribute with its value.
Put as many attributes as you want, you better create a variable for your array of attributes.
Yeah cool but how to install?
You can install the kirbytextWrap plugin manually, with CLI, through Git submodule or with Composer.
-
Manually:
Just download your desired version through the releases page, unzip and place the given folder into thesite/plugin
directory and rename it tokirbytextWrap
. -
Kirby CLI:
⚠️ This will just work for Kirby 2 has CLI was removed on Kirby 3.
-
Git submodule:
- Composer:
Contributing
If you see a typo, or found a bug, please let me know! Share also your ideas through the issues tab.
Thanks for your help.
Clone this repo and run npm install.
On each commit, Prettier will be run.
Credits
🤚 High five to @judbd who give me this plugin idea.
🎩 Hat tip to Jannik with his kirbytextRaw plugin who helped me when started to develop this plugin!