-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create custom admin article menus #20890
Conversation
See joomla#20233 for detailed explanation of the use case ### Test Instructions Create and enable an admin menu with the "Joomla preset" Create a new admin menu item of type article list and you can see you now have a full set of filters that you can apply. For example you can now create menu items in the admin to each category. If approved I will create the same option for other components This does not resolve everything on joomla#20233 as it still needs field categories to be implemented for that
love it, will give it a test soon 👌 |
name="filter_language" | ||
type="contentlanguage" | ||
label="COM_MENUS_ADMIN_LANGUAGE_LABEL" | ||
description="COM_MENUS_ADMIN_LANGUAGE_LABEL" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to COM_MENUS_ADMIN_LANGUAGE_DESC
@@ -9,6 +9,18 @@ COM_MENUS_ACTION_DESELECT="Deselect" | |||
COM_MENUS_ACTION_EXPAND="Expand" | |||
COM_MENUS_ACTION_SELECT="Select" | |||
COM_MENUS_ADD_MENU_MODULE="Add a module for this menu" | |||
COM_MENUS_ADMIN_AUTHOR_DESC="Filter by author." | |||
COM_MENUS_ADMIN_AUTHOR_LABEL="Author" | |||
COM_MENUS_ADMIN_CATEGORY_DESC="Filter by Category" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lowercase C
and add a period.
Can add |
Sorry I don't understand |
</field> | ||
|
||
<field | ||
name="filter_tag" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for example, add to this field the filter="int_array"
No, all this is doing is pre-setting the filters that already exit on a page.
…On 27 Jun 2018, 14:05 +0100, Carlos Rodriguez ***@***.***>, wrote:
Can we add filters to the new fields, or in this case is not necessary? following what doing in others PRs
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
He's talking about input filters (essentially |
Then of course it is possible as we are just passing the request variables. But in doing that, you have no control over the filters on that page if you pass them in and they work. Note, I haven’t tried filtering the admin ui with filters not existent on the UI. But wouldn’t really advise it.
…On 27 Jun 2018, 14:28 +0100, Michael Babker ***@***.***>, wrote:
He's talking about input filters (essentially JFactory::getApplication()->input->get('foo', 'default', $filter);, not the UI filters.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
You're still missing the point here I'm afraid. The |
Ah, clearly I missed that. I just saw the filter on custom fields.
…On 27 Jun 2018, 14:35 +0100, Michael Babker ***@***.***>, wrote:
You're still missing the point here I'm afraid.
The filter="whatever" attribute sets what data type something is filtered/validated as when it is read from the request in the JForm API when filtering/validating data. So if you set filter="int" on a field, then when the field's data is read from the request it is filtered/validated as an integer.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@tonypartridge Sorry for no explain well when i ask about this. Thank you @mbabker |
Gotya. Will update. |
@SharkyKZ can you check the filters please |
So, this is well covered in this PR. Except, not for the Statue and Access levels. Also, will be good do the same with the featured articles view |
I did think about status and access but there is no point. A users ACL addresses the access and I don't want to pre-filter on status - thats not a good idea. As for the featured view thats a special type of thing and it doesnt match the use case for this - my 2c |
Roger that. So, this work perfect! |
I have tested this item ✅ successfully on 921f0e1 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20890. |
Filters OK. |
I actually think the access level could be handy for when filtering lots of articles assigned to certain access levels, i.e. ‘Guest Articles’, ‘Members Articles’. ?
Just a thought
…On 27 Jun 2018, 15:38 +0100, Brian Teeman ***@***.***>, wrote:
I did think about status and access but there is no point. A users ACL addresses the access and I don't want to pre-filter on status - thats not a good idea.
As for the featured view
> If approved I will create the same option for other components
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@tonypartridge ah - I was thinking of ACL and not access levels - i will add it |
I have tested this item ✅ successfully on 8284fd0 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20890. |
filter="int_array" | ||
> | ||
<option value="0">JNONE</option> | ||
</field> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove trailing tabs
description="COM_MENUS_ADMIN_ACCESS_DESC" | ||
multiple="true" | ||
filter="int_array" | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove trailing tab
I have tested this item ✅ successfully on aa76e5b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20890. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/20890. |
Thanks for merging. I will add the same for other components now. |
Thanks for this effort Brian et al,.. to make this thing really sing, is it possible to add 'Category Template Layout' selector to the new category menu item ? The Category Menu already has 'template selector', but it only works on single articles and not the category list/blog files (because the list/blog is inherently the category template via an XML file ). Perhaps create a new menu item called "Category (templateable)" so all the old stuff is compatible, and then allow it to properly override both the category and article layouts.. ? |
@helpwise can you please open a new Issue (and Link to this PR) as Comments on closed Issues didn't get much Notice? |
Oh - yes - sorry! :) |
See #20233 for detailed explanation of the use case
Test Instructions
Create and enable an admin menu with the "Joomla preset"
Create a new admin menu item of type article list and you can see you now have a full set of filters that you can apply.
For example you can now create menu items in the admin to each category.
If approved I will create the same option for other components
This does not resolve everything on #20233 as it still needs field categories to be implemented for that
Thanks to @tonypartridge for his help