calebgrove / content-viewer Goto Github PK
View Code? Open in Web Editor NEWA nifty little Kirby widget that allows you to show a block of Kirbytext or Markdown content in Kirby's panel.
License: MIT License
A nifty little Kirby widget that allows you to show a block of Kirbytext or Markdown content in Kirby's panel.
License: MIT License
If you have in your Kirby Role the wildcard permission set to false ('*' => false
) you have to set the permission for this widget explicitly.
Unfortunately that would look like this at the moment: 'panel.widget.widget' => true
Which is pretty nasty because you dont know what widget that actually is and you get serious problems if another widget you use did the same mistake.
For reference and context, here is the discussion I had with texnixe on the topic:
https://forum.getkirby.com/t/widgets-are-auto-hidden-when-permission-is-false/9758
Hi Caleb, Thank you soo much for making this publicly available. We always write client documentation by hand but I'm looking into modernizing that system.
I like my dashboard super simple, but the content-viewer widget isn't filling the available space. I'm going to add a lot of content to this widget, so I'd like it to move right and fill in the remaining space. (screenshot)
How could I go about doing this? Thank you!!
Call to a member function text() on boolean
/site/plugins/content-viewer/widget/widget.php
Line 7: if($page->$field()->value()->isNotEmpty()){
Multi-lingual Site
Kirby version: 2.5.7
PHP 7.0.25
any ideas?
This is not a bug, but there's almost exactly the same CSS stored in three different places.
site/plugins/content-viewer/widget/template.php
site/plugins/content-viewer/templates/content-viewer.php
site/plugins/content-viewer/templates/content-viewer-source.php
Of them, only site/plugins/content-viewer/templates/content-viewer.php
has few CSS rules which are not shared, but it would be easy to just overwrite them (as it's being done already).
The main problem is that you have to edit all these 3 files in order to change styling in all of these 3 views. Of course, sometimes you'd want to have different styles for each one. But that's perfectly fine if you have a shared base-style and then can easily build upon it or just overwrite what you want.
While developing a site I installed many plugins and additional fields and so on. At some point I noticed my multilang site was not working properly.
Changing language was not working. I could change the language, the page was redirected (example.com/en
), all the language variables were changed (for example $site->language()
is changed correctly) and it was fine, but snippets fetching pages' content still fetched the default language content.
I finally found out it was caused by your plugin, this part:
// If the page doesn't exist yet, create it.
if(!site()->index()->findBy('intendedTemplate', 'content-viewer')) {
site()->create('content-viewer', 'content-viewer', array(
'title' => '',
'text' => ''
));
}
Not really sure how this affects multilang config, but it surely does. Just commenting this part and it works again.
Sometimes you don't even want admins to see the "edit" button. There should be a way to hide the button from everybody. Anyone with filesystem access will still be able to directly edit the .md file to update the content.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.