Use Default Value checkbox for custom category ui_componentRemove store level value for category attributeHow can i rewrite TierPrice Block in Magento2Category attributes in collection without default valueMagento 2: What's the `ui_component` folder for?Add checkbox field with catalog categoryMagento 2 Can't we use same name for ui_component file in different moduleui_component form custom tab attributeAdd “Use Default Option” In Custom Category Attribute In Magento 2Magento2: Custom attribute of category. Add default value in all existing category once we InstallData scriptSet Use Default Value for all categories attributes Magento 2
How do I make distance between concentric circles equal?
What professions would a medieval village with a population of 100 need?
Potential new partner angry about first collaboration - how to answer email to close up this encounter in a graceful manner
How to dismiss intrusive questions from a colleague with whom I don't work?
Church Booleans
Why we don't have vaccination against all diseases which are caused by microbes?
Why don't we use Cavea-B
Why is observed clock rate < 3MHz on Arduino Uno?
How to refer to a regex group in awk regex?
What is the evidence on the danger of feeding whole blueberries and grapes to infants and toddlers?
Have only girls been born for a long time in this village?
How does turbine efficiency compare with internal combustion engines if all the turbine power is converted to mechanical energy?
How can I watch the 17th (or last, if less) line in files of a folder?
On the feasibility of space battleships
A list of proofs of "Coherent topoi have enough points"
Was Tuvok bluffing when he said that Voyager's transporters rendered the Kazon weapons useless?
When translating the law, who ensures that the wording does not change the meaning of the law?
How do I find the fastest route from Heathrow to an address in London using all forms of transport?
Why is Boris Johnson visiting only Paris & Berlin if every member of the EU needs to agree on a withdrawal deal?
Why is 日本 read as "nihon" but not "nitsuhon"?
How to write triplets in 4/4 time without using a 3 on top of the notes all the time
Ask for a paid taxi in order to arrive as early as possible for an interview within the city
What is the hex versus octal timeline?
How to avoid using System.String with Rfc2898DeriveBytes in C#
Use Default Value checkbox for custom category ui_component
Remove store level value for category attributeHow can i rewrite TierPrice Block in Magento2Category attributes in collection without default valueMagento 2: What's the `ui_component` folder for?Add checkbox field with catalog categoryMagento 2 Can't we use same name for ui_component file in different moduleui_component form custom tab attributeAdd “Use Default Option” In Custom Category Attribute In Magento 2Magento2: Custom attribute of category. Add default value in all existing category once we InstallData scriptSet Use Default Value for all categories attributes Magento 2
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I added a custom category attribute "Listing Image" and want to display the checkbox "Set Default Value", like "Thumbnail" and "Category Image". I already compared the ui_component, but couldn't find the entry for that.

<?xml version="1.0" ?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="content">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Content</item>
<item name="collapsible" xsi:type="boolean">true</item>
<item name="sortOrder" xsi:type="number">10</item>
</item>
</argument>
<field name="listingimage">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="dataType" xsi:type="string">string</item>
<item name="source" xsi:type="string">category</item>
<item name="label" xsi:type="string" translate="true">Listing Image</item>
<item name="visible" xsi:type="boolean">true</item>
<item name="formElement" xsi:type="string">fileUploader</item>
<item name="elementTmpl" xsi:type="string">ui/form/element/uploader/uploader</item>
<item name="previewTmpl" xsi:type="string">Magento_Catalog/image-preview</item>
<item name="sortOrder" xsi:type="number">45</item>
<item name="required" xsi:type="boolean">false</item>
<item name="uploaderConfig" xsi:type="array">
<item name="url" xsi:type="url" path="categorylandingpage/category/upload/attribute_code/listingimage"/>
</item>
<item name="scopeLabel" xsi:type="string">[WEBSITE]</item>
</item>
</argument>
</field>
</fieldset>
</form>
magento2 uicomponent category-attribute
add a comment |
I added a custom category attribute "Listing Image" and want to display the checkbox "Set Default Value", like "Thumbnail" and "Category Image". I already compared the ui_component, but couldn't find the entry for that.

<?xml version="1.0" ?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="content">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Content</item>
<item name="collapsible" xsi:type="boolean">true</item>
<item name="sortOrder" xsi:type="number">10</item>
</item>
</argument>
<field name="listingimage">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="dataType" xsi:type="string">string</item>
<item name="source" xsi:type="string">category</item>
<item name="label" xsi:type="string" translate="true">Listing Image</item>
<item name="visible" xsi:type="boolean">true</item>
<item name="formElement" xsi:type="string">fileUploader</item>
<item name="elementTmpl" xsi:type="string">ui/form/element/uploader/uploader</item>
<item name="previewTmpl" xsi:type="string">Magento_Catalog/image-preview</item>
<item name="sortOrder" xsi:type="number">45</item>
<item name="required" xsi:type="boolean">false</item>
<item name="uploaderConfig" xsi:type="array">
<item name="url" xsi:type="url" path="categorylandingpage/category/upload/attribute_code/listingimage"/>
</item>
<item name="scopeLabel" xsi:type="string">[WEBSITE]</item>
</item>
</argument>
</field>
</fieldset>
</form>
magento2 uicomponent category-attribute
add a comment |
I added a custom category attribute "Listing Image" and want to display the checkbox "Set Default Value", like "Thumbnail" and "Category Image". I already compared the ui_component, but couldn't find the entry for that.

<?xml version="1.0" ?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="content">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Content</item>
<item name="collapsible" xsi:type="boolean">true</item>
<item name="sortOrder" xsi:type="number">10</item>
</item>
</argument>
<field name="listingimage">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="dataType" xsi:type="string">string</item>
<item name="source" xsi:type="string">category</item>
<item name="label" xsi:type="string" translate="true">Listing Image</item>
<item name="visible" xsi:type="boolean">true</item>
<item name="formElement" xsi:type="string">fileUploader</item>
<item name="elementTmpl" xsi:type="string">ui/form/element/uploader/uploader</item>
<item name="previewTmpl" xsi:type="string">Magento_Catalog/image-preview</item>
<item name="sortOrder" xsi:type="number">45</item>
<item name="required" xsi:type="boolean">false</item>
<item name="uploaderConfig" xsi:type="array">
<item name="url" xsi:type="url" path="categorylandingpage/category/upload/attribute_code/listingimage"/>
</item>
<item name="scopeLabel" xsi:type="string">[WEBSITE]</item>
</item>
</argument>
</field>
</fieldset>
</form>
magento2 uicomponent category-attribute
I added a custom category attribute "Listing Image" and want to display the checkbox "Set Default Value", like "Thumbnail" and "Category Image". I already compared the ui_component, but couldn't find the entry for that.

<?xml version="1.0" ?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="content">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="label" xsi:type="string" translate="true">Content</item>
<item name="collapsible" xsi:type="boolean">true</item>
<item name="sortOrder" xsi:type="number">10</item>
</item>
</argument>
<field name="listingimage">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="dataType" xsi:type="string">string</item>
<item name="source" xsi:type="string">category</item>
<item name="label" xsi:type="string" translate="true">Listing Image</item>
<item name="visible" xsi:type="boolean">true</item>
<item name="formElement" xsi:type="string">fileUploader</item>
<item name="elementTmpl" xsi:type="string">ui/form/element/uploader/uploader</item>
<item name="previewTmpl" xsi:type="string">Magento_Catalog/image-preview</item>
<item name="sortOrder" xsi:type="number">45</item>
<item name="required" xsi:type="boolean">false</item>
<item name="uploaderConfig" xsi:type="array">
<item name="url" xsi:type="url" path="categorylandingpage/category/upload/attribute_code/listingimage"/>
</item>
<item name="scopeLabel" xsi:type="string">[WEBSITE]</item>
</item>
</argument>
</field>
</fieldset>
</form>
magento2 uicomponent category-attribute
magento2 uicomponent category-attribute
asked Aug 9 at 12:29
torhoehntorhoehn
16010 bronze badges
16010 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I already did that as listing grid product, see the image above.

Using:
MagentoFrameworkViewAssetRepository $assetRepo,
$this->assetRepo->getUrl('Magento_Catalog::images/product/placeholder/thumbnail.jpg');
1- file Thumbnail.php
<?php
namespace PHPAISSJobsUiComponentListingColumnJobs;
use MagentoFrameworkDataObject;
use MagentoFrameworkUrlInterface;
use MagentoFrameworkViewAssetRepository;
use MagentoFrameworkViewElementUiComponentContextInterface;
use MagentoFrameworkViewElementUiComponentFactory;
use MagentoUiComponentListingColumnsColumn;
use PHPAISSJobsHelperData;
class Thumbnail extends Column
string
*/
protected function getAlt($row)
$altField = $this->getData('config/altField') ?: self::ALT_FIELD;
return isset($row[$altField]) ? $row[$altField] : null;
2 - file jobs_job_listing.xml
<!--
** Thumbnail Column
** The name 'thumbnail' defined in const NAME = 'thumbnail' in file:
** PHPAISSJobsUiComponentListingColumnJobsThumbnail
-->
<column name="thumbnail" class="PHPAISSJobsUiComponentListingColumnJobsThumbnail" component="Magento_Ui/js/grid/columns/thumbnail">
<settings>
<altField>title</altField>
<hasPreview>1</hasPreview>
<label translate="true">Thumbnail</label>
<sortable>false</sortable>
</settings>
</column>
You can check the module in my github: Jobs Module
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f284994%2fuse-default-value-checkbox-for-custom-category-ui-component%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I already did that as listing grid product, see the image above.

Using:
MagentoFrameworkViewAssetRepository $assetRepo,
$this->assetRepo->getUrl('Magento_Catalog::images/product/placeholder/thumbnail.jpg');
1- file Thumbnail.php
<?php
namespace PHPAISSJobsUiComponentListingColumnJobs;
use MagentoFrameworkDataObject;
use MagentoFrameworkUrlInterface;
use MagentoFrameworkViewAssetRepository;
use MagentoFrameworkViewElementUiComponentContextInterface;
use MagentoFrameworkViewElementUiComponentFactory;
use MagentoUiComponentListingColumnsColumn;
use PHPAISSJobsHelperData;
class Thumbnail extends Column
string
*/
protected function getAlt($row)
$altField = $this->getData('config/altField') ?: self::ALT_FIELD;
return isset($row[$altField]) ? $row[$altField] : null;
2 - file jobs_job_listing.xml
<!--
** Thumbnail Column
** The name 'thumbnail' defined in const NAME = 'thumbnail' in file:
** PHPAISSJobsUiComponentListingColumnJobsThumbnail
-->
<column name="thumbnail" class="PHPAISSJobsUiComponentListingColumnJobsThumbnail" component="Magento_Ui/js/grid/columns/thumbnail">
<settings>
<altField>title</altField>
<hasPreview>1</hasPreview>
<label translate="true">Thumbnail</label>
<sortable>false</sortable>
</settings>
</column>
You can check the module in my github: Jobs Module
add a comment |
I already did that as listing grid product, see the image above.

Using:
MagentoFrameworkViewAssetRepository $assetRepo,
$this->assetRepo->getUrl('Magento_Catalog::images/product/placeholder/thumbnail.jpg');
1- file Thumbnail.php
<?php
namespace PHPAISSJobsUiComponentListingColumnJobs;
use MagentoFrameworkDataObject;
use MagentoFrameworkUrlInterface;
use MagentoFrameworkViewAssetRepository;
use MagentoFrameworkViewElementUiComponentContextInterface;
use MagentoFrameworkViewElementUiComponentFactory;
use MagentoUiComponentListingColumnsColumn;
use PHPAISSJobsHelperData;
class Thumbnail extends Column
string
*/
protected function getAlt($row)
$altField = $this->getData('config/altField') ?: self::ALT_FIELD;
return isset($row[$altField]) ? $row[$altField] : null;
2 - file jobs_job_listing.xml
<!--
** Thumbnail Column
** The name 'thumbnail' defined in const NAME = 'thumbnail' in file:
** PHPAISSJobsUiComponentListingColumnJobsThumbnail
-->
<column name="thumbnail" class="PHPAISSJobsUiComponentListingColumnJobsThumbnail" component="Magento_Ui/js/grid/columns/thumbnail">
<settings>
<altField>title</altField>
<hasPreview>1</hasPreview>
<label translate="true">Thumbnail</label>
<sortable>false</sortable>
</settings>
</column>
You can check the module in my github: Jobs Module
add a comment |
I already did that as listing grid product, see the image above.

Using:
MagentoFrameworkViewAssetRepository $assetRepo,
$this->assetRepo->getUrl('Magento_Catalog::images/product/placeholder/thumbnail.jpg');
1- file Thumbnail.php
<?php
namespace PHPAISSJobsUiComponentListingColumnJobs;
use MagentoFrameworkDataObject;
use MagentoFrameworkUrlInterface;
use MagentoFrameworkViewAssetRepository;
use MagentoFrameworkViewElementUiComponentContextInterface;
use MagentoFrameworkViewElementUiComponentFactory;
use MagentoUiComponentListingColumnsColumn;
use PHPAISSJobsHelperData;
class Thumbnail extends Column
string
*/
protected function getAlt($row)
$altField = $this->getData('config/altField') ?: self::ALT_FIELD;
return isset($row[$altField]) ? $row[$altField] : null;
2 - file jobs_job_listing.xml
<!--
** Thumbnail Column
** The name 'thumbnail' defined in const NAME = 'thumbnail' in file:
** PHPAISSJobsUiComponentListingColumnJobsThumbnail
-->
<column name="thumbnail" class="PHPAISSJobsUiComponentListingColumnJobsThumbnail" component="Magento_Ui/js/grid/columns/thumbnail">
<settings>
<altField>title</altField>
<hasPreview>1</hasPreview>
<label translate="true">Thumbnail</label>
<sortable>false</sortable>
</settings>
</column>
You can check the module in my github: Jobs Module
I already did that as listing grid product, see the image above.

Using:
MagentoFrameworkViewAssetRepository $assetRepo,
$this->assetRepo->getUrl('Magento_Catalog::images/product/placeholder/thumbnail.jpg');
1- file Thumbnail.php
<?php
namespace PHPAISSJobsUiComponentListingColumnJobs;
use MagentoFrameworkDataObject;
use MagentoFrameworkUrlInterface;
use MagentoFrameworkViewAssetRepository;
use MagentoFrameworkViewElementUiComponentContextInterface;
use MagentoFrameworkViewElementUiComponentFactory;
use MagentoUiComponentListingColumnsColumn;
use PHPAISSJobsHelperData;
class Thumbnail extends Column
string
*/
protected function getAlt($row)
$altField = $this->getData('config/altField') ?: self::ALT_FIELD;
return isset($row[$altField]) ? $row[$altField] : null;
2 - file jobs_job_listing.xml
<!--
** Thumbnail Column
** The name 'thumbnail' defined in const NAME = 'thumbnail' in file:
** PHPAISSJobsUiComponentListingColumnJobsThumbnail
-->
<column name="thumbnail" class="PHPAISSJobsUiComponentListingColumnJobsThumbnail" component="Magento_Ui/js/grid/columns/thumbnail">
<settings>
<altField>title</altField>
<hasPreview>1</hasPreview>
<label translate="true">Thumbnail</label>
<sortable>false</sortable>
</settings>
</column>
You can check the module in my github: Jobs Module
answered Aug 9 at 13:17
aissyassaissyass
562 bronze badges
562 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f284994%2fuse-default-value-checkbox-for-custom-category-ui-component%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown