nliautaud / pico-pages-list Goto Github PK
View Code? Open in Web Editor NEWA pages lists plugin for Pico CMS, with nested pages, pages filtering and HTML navigation.
License: MIT License
A pages lists plugin for Pico CMS, with nested pages, pages filtering and HTML navigation.
License: MIT License
Is it possible to use such a condition in twig?
ex.
{% if config.PicoFilePrefixes.enabled %}
...
{% else %}
...
{% endif %}
It doesn't look like this plugin sorts the list according to $config['pages_order_by'] / $config['pages_order'] instructions. Should this plugin follow that default/declared sort config, or should it have its own config values (something like $config['pages_list_order'] ) for fine-tuned control?
Hi - similar to another issue - same same but different.
I have the following directory structure:
index.md
issueone/
index.md
anotherpage.md
issuetwo/
index.md
issuethree/
index.md
moreissuethree.md
issuefour/
index.md
issuefive/
issuefivepage.md
When I am looking at anotherpage.md or issueone/index.md, the list item containing the link has 'is-current' and 'is-active' classes. The containing folder list item is marked 'is-active'.
When I am looking at issuetwo/index.md, the list item containing the page link does not have either a 'is-current' or a 'is-active' class, and the parent folder list item does not have e is-active class.
When I am looking at issuethree/issue/four/index.md, the list ltem containing the page link does not have a is-active or a is-current class, but the list item containing the issuefour link does have a is-active class.
If there is an index.md, it seems the is-active and is-current classes are only added if there is also a sibling page or directory.
In the case of issuefive, the issuefive list item contains a span, and list item containing the issuefivepage.md link will have is-active and is-current classes. This makes collapsing the menu item tricky. It may be possible if you are clever enough.
Is this a bug or a feature :-)
I have following content structure:
Instead of those <span>
tags, I would like to get links directly to the index files of each subfolder:
Is this anyhow possible?
This: {{ nested_pages | navigation }} gives no output.
And this: {{ pages | navigation }} output do not get parsed:
<ul><li class="_meta is-page"><a href="https://domain.de/pico/_meta">_meta</a></li><li class="index is-page">
So is this plugin to old to work with Pico 2.1?
A cleaner interface allowing access to both a flat and a nested array, that can be both filtered and rendered, may be trough twig filters. Something like :
{{ pages }} // flat list of pages
{{ pages | nested }} // nested list of pages/dirs
{{ pages | html_tree }} // render the given array
{{ pages | only: 'foo/bar' }} // filter the given array
{{ pages | exclude: 'foo/bar', 'other' }} // filter the given array
// ex :
{{ pages | nested | exclude: 'foo/bar', 'other' | html_tree }}
Page url may be encoded when url rewriting is inactive, breaking the nesting.
pico/?sub%2Findex
README says "copy the PHP file into the plugins folder and use the tag" but I tried that and it just outputs the tag.
Do you can add a class (hasChildActive) to li.has-childs that have childs page li.is-current; to toggle with css selector?
Hey Nicolas
I installed the 3.0.0-alpha1 on my Webspace and added the learn2 Theme, which includes the PageList-Plugin.
It works fine, but after installing the PicoEditor i get this message:
Notice: Trying to access array offset on value of type null in /www/htdocs/domain.de/plugins/PicoPagesList/PicoPagesList.php on line 67
But the Editor is still working.
I posted this Issue here first: picocms/Pico#528
there is even a solution.
Hi, I just added the file to plugins
, now it throws this below (using pico 2).
Fatal error: Uncaught exception 'LogicException' with message 'Unable to add filter "navigation" as extensions have already been initialized.' in <PATH>/vendor/twig/twig/lib/Twig/Environment.php:1103
Stack trace:
#0 /<PATH>/plugins/PicoPagesList.php(73): Twig_Environment->addFilter(Object(Twig_SimpleFilter)) #1 [internal function]: PicoPagesList->onPageRendering(Object(Twig_Environment), Array, 'help.twig')
#2 <PATH>/vendor/picocms/pico/lib/AbstractPicoPlugin.php(117): call_user_func_array(Array, Array)
#3 <PATH>/plugins/PicoDeprecated/PicoDeprecated.php(857): AbstractPicoPlugin->handleEvent('onPageRendering', Array)
#4 <PATH>/plugins/PicoDeprecated/PicoDeprecated.php(689): PicoDeprecated->triggerEvent(1, 'onPageRendering', Array)
#5 [internal function]: PicoDeprecated->onPageR in <PATH>/vendor/twig/twig/lib/Twig/Environment.php on line 1103
Any missing dependency, or what?
Hi - installed on a couple of machines with picoCMS 2.0.4 and get following error:
[Thu May 9 20:31:51 2019] PHP Fatal error: Uncaught RuntimeException: Unable to load plugin 'pico-pages-list' from 'pico-pages-list/pico-pages-list.php': Plugin class not found in /var/lib/nethserver/home/don/htdocs/picocms/pico/vendor/picocms/pico/lib/Pico.php:669 Stack trace: #0 /var/lib/nethserver/home/don/htdocs/picocms/pico/vendor/picocms/pico/lib/Pico.php(520): Pico->loadLocalPlugins(Array) #1 /var/lib/nethserver/home/don/htdocs/picocms/pico/vendor/picocms/pico/lib/Pico.php(401): Pico->loadPlugins() #2 /var/lib/nethserver/home/don/htdocs/picocms/pico/index.php(33): Pico->run() #3 {main} thrown in /var/lib/nethserver/home/don/htdocs/picocms/pico/vendor/picocms/pico/lib/Pico.php on line 669
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.