In Drupal 7, it was possible with hook_navbar() but now in Drupal 8 I am not sure anymore how to do it. Do you have maybe some exampl?
You need a local tasks menu link yml file, see example in node module
For this you need to create a route in the module.routing.yml file
route_name:
path: 'admin/config/people/ban/settings'
defaults:
_form: '\Drupal\modulename\Form\FormController'
-title: Form Title
requirements:
_permission: 'your permission string'
then you need to create another yml file with the name mymodule.links.menu.yml
add the following code
form_config_link:
title: Configure Form Title
description: 'Configuration Form description'
parent: system.admin_config_people
route_name: route_name //defined above
You need to check system module yml file for parent name
Related
I migrate from odoo 13 to odoo 14, but when I import all this; My website has an error like :
load could not load template
ValueError: The element '<xpath expr="//*[hasclass('o_footer_copyright_name')]">' could not be located in the parent view
View name: Footer Language Selector
Error context:
view: ir.ui.view(3822,)
view.parent: ir.ui.view(2094,)
Template: 1816
Path: /t/t
An error occurred while rendering template 1816
I didn't edited this view btw.
If anyone has a solution I'm interested!
Thanks by advance !
I experienced the same issue while upgrading from Odoo Enterprise 13 to 14.
Note the following points:
The Release Notes (https://www.odoo.com/odoo-14-release-notes) state:
"Add the language selector in the header and customize the layout."
There is a new view added called 'Footer Language Selector' (Key:
portal.footer_language_selector). This appears to be added while
running the Odoo DB upgrade 13 > 14.
The 'Footer Language Selector' view is not created when setting up a new
Odoo 14 database!
To resolve your issue, you need to disable the 'Footer Language Selector' view. This can be done in one of two ways:
If you are logged in to your Odoo instance, enable Developer Mode, and go to Settings > Technical > User Interface > Views and search for 'Footer Language Selector'. Select the view, and then select the menu option to 'Archive'
If you are not logged in/not able to log in, you need to disable the view in the database directly. Here is the command that will disable the view: UPDATE public.ir_ui_view SET active = false WHERE id = 3822; NOTE: the 'id = 3822' value must match the view number in the error: ir.ui.view(3822,)
I hope this helps you resolve the issue which appears to be a bug introduced by the Odoo DB update tool.
I have a TiddlyWiki where the tiddlers have a field "saveto". I want to add a line to the file '$:/config/FileSystemPaths' to prefix the name of the tiddler with the value of the "saveto" field. For example, the tiddler
created: 20200114160408003
modified: 20200114160440095
saveto: test
tags:
title: New Tiddler
type: text/vnd.tiddlywiki
should be saved at test/New Tiddler.tid
Is it possible? I don't know much about filters, these are some things I have tried:
[has[saveto]addprefix[get[saveto]]]
[has[saveto]addprefix:get[saveto]]
[has[saveto]addprefix{!!saveto}]
Thanks for any help!
Here is something that works:
[has[saveto]get[saveto]] [get[title]] +[join[/]]
This solution was created by Jeremy Ruston as an answer to my post on the Tiddlywiki google groups forum
Here I can read that when configuring a prospect I can add a custom field to the data, which later I can use for filtering.
So for example I can write
- type: log
paths:
- /my/path/app1.csv
fields:
app_name: app1
- type: log
paths:
- /my/path/app2.csv
fields:
app_name: app2
This means that anytime I will have a new CSV file to track I have to add it to the filebeat.yml file adding the custom app_name field accordingly.
I was wondering if I could use a regex with a capture group in the prospect definition to "automatically" track any new file and assign the right app_name value. Something like this:
- type: log
paths:
- /my/path/(.*).csv
fields:
app_name: \1
What do you think? I didn't find any documentation regarding this possibility with the fields feature.
As adviced here, I can use the source Filebeat field to filter the data. This field is the path of the harvested files, so no other field is required to filter.
in opencart when edit my featured module, and add new product, my search is by name, and not by model...
it is possible search by product model?? and not by name
this happens in all modules that need to add a product
You don't need to do much more just edit below file only:
\opt\lampp\htdocs\opencart\admin\view\template\module\featured.tpl
on Line no.121
url: 'index.php?route=catalog/product/autocomplete&token=<?php echo $token; ?>&filter_name=' + encodeURIComponent(request.term),
You need to just
url: 'index.php?route=catalog/product/autocomplete&token=<?php echo $token; ?>&filter_model=' + encodeURIComponent(request.term),
you need to filter_model as parameter which you will be type
I created custom module in Drupal 8. This module should create tab in admin/content. But unfortunately tab does not display in admin/content section. While I can able to access my module. Link to access my module 'localhost/demo/admin/content/book'
Here is my code:-
book.routing.yml
# book.routing.yml snippet
book.admin:
path: '/admin/content/book'
defaults:
_form: '\Drupal\book\Form\bookForm'
_title: 'BOOKS'
requirements:
_permission: 'book access'
book.links.menu.yml
# book.links.menu.yml snippet
book.admin:
route_name: book.admin
title: BOOKS
base_route: system.admin_content
For more information attaching screenshot, where I want tab
Expecting this one
you should rename the file to
book.links.task.yml
because what you want is a "task" of the content instead of a real menu link. Here's a great explanation and guide how to create custom modules:
http://www.sitepoint.com/build-drupal-8-module-routing-controllers-menu-links/
Note that some of his file namings are outdated (e.g. "menu_links"), but the general idea/structure of a module is still well explained.