Publish Filtering
This is an open discussion with 122 replies, filed under Extensions.
Search
Nick, have you ever thought about an option to include the filter on certain pages only. I normally have a few sections that will never be paginated and that search looks a bit over the top for just four items.
I've never considered this, no... I just ignore it if it's not needed. I suppose there could be a config setting to "Show for all sections" checkbox or "Choose sections to show on" selectbox.
Okay, I needed this so here we go: https://github.com/nickdunn/publishfiltering/pull/7
Publish Filtering
updated to version 1.6.0
on 18th of March 2011
This release is courtesy of Nils (above). 1.6.0
adds a checkbox to the section editor (unchecked by default) so that you can disable the filtering UI from certain sections that don't need it. Thanks mate, a neat implementation.
Thanks mate, a neat implementation.
You're welcome :)
(checked by default)
Uhm, it's unchecked by default. Otherwise the filter would be excluded from all sections.
Duh yes, you're right. Corrected!
@nick
How does this extension work? After following the issue here I realized the your extension alters something in fields' execution.
For example, on a listing page of entries (publish/articles
):
Before I install Publish Filtering
, both Multilingual Field
and Order Entries
didn't execute function displayPublishPanel()
from lib/field.xxx.php
. Didn't try other extensions.
After I installed and activated Publish Filtering
, both Multilingual Field
and Order Entries
executed function displayPublishPanel()
. Didn't try other extensions.
Is this the normal behavior of the extension?
In the normal case, should this extension alter some inner workings of Symphony that cause other fields to trigger functions when they shouldn't?
I've replied in the other thread.
Nick, I get this error in one of my sections:
DOMDocument::loadXML() [domdocument.loadxml]: Entity 'ndash' not defined in Entity, line: 1 /www/htdocs/extensions/publishfiltering/extension.driver.php line 116 111 112 $html = new XMLElement('html'); 113 $field->displayPublishPanel($html); 114 115 $dom = new DomDocument(); 116 $dom->loadXML($html->generate()); 117 118 $xpath = new DomXPath($dom); 119 120 $count = 0;
I'm not sure what is causing this: it's an empty section with input fields, a textarea and a textbox field. Nothing that contains or outputs a ndash
as far as I'm aware of.
Maybe you have an idea? Or do you know a good way to check the validity of the XML before loading it? I think Publish Filtering should fail silently instead of breaking the whole interface.
How odd. This HTML is the result of the call to the field's displayPublishPanel
so perhaps some default values contain this? Could you check the HTML source of the entry form to see if an ndash
or something similar appears in the source?
I discovered the other day an easy way of checking for these nasty XML errors, so I'll fix this up so that it fails silently if XML is invalid.
Publish Filtering
updated to version 1.6.1
on 8th of May 2011
- implemented
getDefaultPublishContent
method for Subsection Manager and beyond... - error suppression if field XML is invalid, no longer errors, field will be omitted from the list
- fixed JavaScript conflict with Documenter
This is a really useful extension, but a client has a requirement to be able to show entries between two dates, or at least all entries later than a specified date.
So my suggestion is that if a user selects a date field from the drop down, you show "later than", "earlier than" and "from... to..." fields.
Right now the extension doesn't impose any real specific functionality on a per-field basis, it just hooks into very generic parsing of Symphony's HTML. If the date field could somehow expose these filters then it'd certainly be possible.
Hi Nick
Is there any way to limit this to certain sections. There is only one section in my client's site which has enough entries to require the filter, and it would be nice to keep the other sections simpler.
Thanks
Yep. You should see a checkbox in the section editor to disable filtering for that section.
For the extension page details, it's working well for me in 2.2.3.
Is it possible to apply multiple filters for different fields?
For example: filter field a with 'a certain value' and field b with 'some other value' in one 'event'
So you would have multiple filter fields on top of your publish page
I'm not sure but i think i've seen this before somewhere in an ensemble.
Is it possible to apply multiple filters for different fields?
Not yet, but Symphony 2.3 will make this possible. I will be rewriting the extension when Symphony 2.3 is released :-)
Nick, is there a way to make this extension display entries that do not contain a certain value?
Create an account or sign in to comment.
DOMDocument::loadXML(): xmlParseEntityRef: no name in Entity, line: 1 /###/###/###/###/###/###/trunk/extensions/publishfiltering/content/content.filters.php line 32