Magento 2.4: How to hide the Upload button in magento 2 admin? - file-upload

We have an image uploader field in Magento 2 admin. When a customer uploads any document in the frontend, the file will be shown in uploader field section. Now what I need is that I want to hide the Upload button in admin and have to restrict admins to upload the attachment from admin portal.
I have tried visible=false but its hide the entire section.
Please help

Is it core Magento or Your custom uploader? Is this menu build in xml? Is it uicomponent? Seems like You want to conditionally disable element. Maybe this would be helpful:
https://karnowka.com/posts/magento2-conditional-layout-directives/
It all depends how You build the buttons. Every xml has xsd schema, that means each one has different possibilities but only few allows to conditionally hide element.
Maybe You can use:
<item name="formElement" xsi:type="string">hidden</item>
or disable element in xml.
Anyway if it's adminhtml I would start looking at xmls.

Related

TYPO3 permissions: Allow backend users to copy content elements but not to edit them (or: how to provide users a library of content elements to copy)

i’d be thankful for some help (maybe i didn’t find the correct terms for a search on the internet?).
Topic: Permissions / Module “Access”
I’m looking for a way to configure permissions in such a way that some backend user are in the same time:
allowed to see (in the page module) all content elements on a certain page
not allowed to edit/hide/delete them
are allowed to copy them into the clipboard
The idea is to give them a kind of library pre-filled+preconfigured content elements to copy and paste on “their” pages.
As soon as i disable the permission to “edit content” on the page in the module “access”, they don’t have a “copy” item in the context menu of the content element anymore.
Is there a way to achieve the goal?
Allow your editor to use the content element «Insert Records». So you can place the prefilled and pre-configured content elements on a page without edit permission.
Editor can «clone» the content elements on their page without the possibility to edit them.
In frontend there is no difference between the original content element and the «clone».
Your scenario is definitely possible. I've just set up a demo TYPO3 installation where this works fine.
You need to create two backend user groups for access:
one for the read only page
and one for the regular pages
In the access module you assign the read only group and set the access rights for read only page only to "Show page".
Then it should be possible to just copy from that page:
I hope this is helpful for you to reproduce it in your installation.

How do I create a Robots.txt editor in Sitefinity mvc?

I want to create an editor for the Robots.txt file in Sitefinity. I want to give the user ability to edit this. How do I do this? I am using the latest version of Sitefinity and MVC. Any examples or related articles, etc. will be useful.
If the user has access to Administration > File Manager, then he can go there, download the file, edit it and upload it again. That's the easiest option and does not require custom code.
If that's not an option, then you can create an MVC widget which reads the file and displays it in a textarea for instance.
User can then make changes and submit them to the controller which will save them to the file.
Then you can place this widget on a custom backend page.

Customize Hybris Backoffice login Theme

Anyone has an idea about how to change the default Backoffice Login Theme (Color, Background and image or any of these) ?
It could be helpful if you point out the file(s) responsible for this, or a specific way to customize it.
Using Hybris 6.0 or later.
Replacing Styles of Backoffice Application :
It is possible to replace the standard look and feel of the Backoffice Application. In other words, you can change the style sheet used in login page and main application pages including all components.
Files responsible for changing Backoffice main page style are located in the following key properties :
backoffice.cockpitng.mainpage.css=/cng/css/mainpage_whitelabel.css
backoffice.cockpitng.loginpage.css=/cng/css/loginpage_whitelabel.css
backoffice.cockpitng.overridewidgetsandeditors.css=/cng/css/customWidgetsAndEditors.css
For more about this topic, you can visit this link.

Piranha CMS customisation

A few questions on customisation with Piranha CMS.
Is there a way to create additional custom site-wide items similar to those from the site helper? http://piranhacms.org/docs/api-reference/site-helper
e.g. to be able to set a phone number used throughout the site but still editable in the settings section of the manager.
Is is possible to create additional custom items for a page, e.g. page subtitle, and for those to appear in the Information section of page editing? Creating a region for say a page subtitle seems overkill.
Is it possible to create a custom page type with a region that is a collection of HtmlRegions or similar? e.g. for the purpose of managing a set of FAQs or similar enumerated content?
Is is possible to define custom settings properties for a page type?
Yes, you can add regions to your site in the same way as with page types under Settings > Sites. You then add content for them under Content > Pages > Edit Site.
You can add simple text properties on the page type. They will be shown as single line text inputs under Properties when editing the page.
No native support, however the region body can be anything that can be serialized to JSON so you have to handle this in the edit view for your region.
There is no support for injecting fields into the page settings, however if it's important you can override the whole edit view for pages and do anything you like by placing a copy of the view in the manager area in your local project. You can find the views in the github repo in the 2.2.5 branch.
Regards
Håkan

Shopify: Change metafields for store

My problem is that when you login on my store - you (not necessarily registered) could add your e-mail and other information.
In this topic:
https://ecommerce.shopify.com/c/shopify-apps/t/allowing-a-customer-to-edit-their-profile-and-metadata-186665
I see that there is a possibility to change the metafields of the customer.
But I need to change the metafields of the store.
Does someone know where to find a list of requests or is there any options to change Metafields?
If you, as somebody with admin access to the store, needs to manually set or modify metafields on your store and either don't want to (or cannot) use a custom app to do so:
Get the (free) ShopifyFD extension for your browser (Link to the extension on the Chrome store)
Log in to your store and go to the 'Settings' (gear icon)
Click ShopifyFD's green '+' icon in your browser to load the extension on the page. You should now see your store metafields appear
You can now add metafields by filling in the boxes, or select existing metafields to manually edit their values.
Note: Metafields that are set by any of the apps that your are using should generally not be edited manually - changing an auto-generated field could really confuse the app that relies on it!