I have Interwoven Teamsite 7.3.x. We have some simple DCTs that current create DCRs in the standard XML format. Would it be possible to configure so that the DCRs are created to the XML schema required by ASP.Net Resx files?
The following datacapture.cfg worked for me!
<?xml version="1.0" standalone="no"?>
Form used to capture data for the MCA resx files
<root-container name="root" location="root">
<container location="resheader" name="resheader1">
<item name="resmimetypeattrib" pathid="#name">
<text>
<default>
resmimetype
</default>
</text>
</item>
<item name="resimetypevalue" pathid="value">
<text>
<default>
text/microsoft-resx
</default>
</text>
</item>
</container>
<container location="resheader" name="resheader2">
<item name="versionattrib" pathid="#name">
<text>
<default>
version
</default>
</text>
</item>
<item name="versionvalue" pathid="value">
<text>
<default>
2.0
</default>
</text>
</item>
</container>
<container location="resheader" name="resheader3">
<item name="readerattrib" pathid="#name">
<text>
<default>
reader
</default>
</text>
</item>
<item name="readervalue" pathid="value">
<text>
<default>
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</default>
</text>
</item>
</container>
<container location="resheader" name="resheader4">
<item name="writerattrib" pathid="#name">
<text>
<default>
writer
</default>
</text>
</item>
<item name="writervalue" pathid="value">
<text>
<default>
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</default>
</text>
</item>
</container>
<container location="data" name="data">
<label>Titles</label>
<item name='lclMypointsResource1' pathid='#name'>
<text>
<default>
lclMypointsResource1.Text
</default>
</text>
</item>
<item name='xml:p' pathid='#xml:space'>
<text>
<default>preserve</default>
</text>
</item>
<item name="value" pathid="value">
<label>My points</label>
<description>Text that should appear in the points control</description>
<text />
</item>
</container>
</root-container>
<script>
<!-- get the item and set readonly in FormAP -->
var item=IWDatacapture.getItem("root/resheader1");
item.setVisible(false);
var item=IWDatacapture.getItem("root/resheader2");
item.setVisible(false);
var item=IWDatacapture.getItem("root/resheader3");
item.setVisible(false);
var item=IWDatacapture.getItem("root/resheader4");
item.setVisible(false);
var item=IWDatacapture.getItem("root/data/lclMypointsResource1");
item.setVisible(false);
var item=IWDatacapture.getItem("root/data/xml:p");
item.setVisible(false);
</script>
</ruleset>
Related
I want to display my custom field in sales rule form only if field simple_data (label Apply) is set to value by_percent. I added this xml in my module:
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="actions" sortOrder="30">
<field name="simple_action" formElement="select">
<settings>
<switcherConfig>
<rules>
<rule name="0">
<value>by_percent</value>
<actions>
<action name="0">
<target>sales_rule_form.sales_rule_form.actions.is_base_price_discount</target>
<callback>show</callback>
</action>
</actions>
</rule>
</rules>
</switcherConfig>
</settings>
</field>
<field name="is_base_price_discount" formElement="checkbox">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">sales_rule</item>
<item name="default" xsi:type="number">0</item>
<item name="sortOrder" xsi:type="number">20</item>
</item>
</argument>
<settings>
<dataType>boolean</dataType>
<label translate="true">Discount from base price</label>
<visible>true</visible>
<dataScope>is_base_price_discount</dataScope>
</settings>
<formElements>
<checkbox>
<settings>
<valueMap>
<map name="false" xsi:type="number">0</map>
<map name="true" xsi:type="number">1</map>
</valueMap>
<prefer>toggle</prefer>
</settings>
</checkbox>
</formElements>
</field>
</fieldset>
</form>
But it still appears with any option selected. How to set it correctly?
enter image description here
I'm trying to make an anchor link in the product grid view.
I have tried this using UI component, below are the detailed view
xml code:
<column name="column_name" class="Vendor\Module\Ui\Component\Listing\Column\link">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Label</item>
<item name="sortOrder" xsi:type="number">50</item>
</item>
</argument>
</column>
datasource code:
$html = ''. __('Label').'';
$item[$this->getData('name')] = $html;
Getting html like this: Label
I want 'Label' with the anchor link.
We have a custom written Magento 2 module that adds an action to the order overview dropdown.
Now have we ran into an issue where it would work on 2.0.x but not 2.1.x and up.
After a bit of research it is caused by Magento changing an xml node from container to listingToolbar.
Now my question is, how do we make our module compatible with both 2.0.x and 2.1.x?
Adding both; container and listingToolbar will break the massaction dropdown.
magento 2.0.x version:
<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<container name="listing_top">
<massaction name="listing_massaction">
<action name="new_action">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="type" xsi:type="string">action_name</item>
<item name="label" xsi:type="string" translate="true">Action Name Text Here</item>
<item name="url" xsi:type="url" path="vendor_module/action"/>
</item>
</argument>
</action>
</massaction>
</container>
magento 2.1.x version:
<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<listingToolbar name="listing_top">
<massaction name="listing_massaction">
<action name="new_action">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="type" xsi:type="string">action_name</item>
<item name="label" xsi:type="string" translate="true">Action Name Text Here</item>
<item name="url" xsi:type="url" path="vendor_module/action"/>
</item>
</argument>
</action>
</massaction>
</listingToolbar>
In Magento 2 how can we add the WYSIWYG editor with the text area field with the form ui component xml file? To add the text area i am using the following code in xml file.
<field name="detail">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="visible" xsi:type="boolean">true</item>
<item name="dataType" xsi:type="string">text</item>
<item name="formElement" xsi:type="string">textarea</item>
<item name="source" xsi:type="string">sample_shop</item>
<item name="label" xsi:type="string">Detail</item>
</item>
</argument>
</field>
In your ui component form xml file add the field like this.
<field name="detail">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="dataType" xsi:type="string">text</item>
<item name="formElement" xsi:type="string">wysiwyg</item>
<item name="source" xsi:type="string">sample_shop</item>
<item name="label" xsi:type="string">Detail</item>
<item name="template" xsi:type="string">ui/form/field</item>
<item name="wysiwyg" xsi:type="boolean">true</item>
<item name="dataScope" xsi:type="string">detail</item>
<item name="sortOrder" xsi:type="number">50</item>
<item name="rows" xsi:type="number">8</item>
</item>
</argument>
</field>
From Magento 2.2, below could work too. And it has better readability and usability.
<field name="content" formElement="wysiwyg">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="source" xsi:type="string">block</item>
</item>
</argument>
<settings>
<additionalClasses>
<class name="admin__field-wide">true</class>
</additionalClasses>
<validation>
<rule name="required-entry" xsi:type="boolean">true</rule>
</validation>
<label/>
<dataScope>content</dataScope>
</settings>
<formElements>
<wysiwyg>
<settings>
<wysiwyg>true</wysiwyg>
</settings>
</wysiwyg>
</formElements>
</field>
Im having problem on integrating header mini cart into my custom theme. Below are the screenshots of the issue. Any help is much appreciated. Thanks in advance :)
Screenshots:
Below is the default.xml code.
<referenceContainer name="header.container">
<container name="header-wrapper" label="Page Header" as="header-wrapper" htmlTag="div" htmlClass="top-header">
<!-- top links with cart -->
<container name="topcartoptions" label="Top Cart Options" htmlTag="div" htmlClass="top-cart-options text-right" before="-">
<block class="Magento\Cms\Block\Block" name="block-top-links">
<arguments>
<argument name="block_id" xsi:type="string">block-top-links</argument>
</arguments>
</block>
</container>
<!-- top menu -->
<container name="mainnavigation" label="Main Navigation" htmlTag="div" htmlClass="main-navigation" after="topcartoptions">
<container name="main-navigation-container" label="Main Navigation" htmlTag="div" htmlClass="container">
<container name="main-navigation-container-row" label="Main Navigation" htmlTag="div" htmlClass="row">
<container name="main-nav-row-bootstrap-class" htmlTag="div" htmlClass="col-lg-12 col-md-12 col-sm-12 col-xs-12 text-center">
<block class="Magento\Cms\Block\Block" name="block-main-nav">
<arguments>
<argument name="block_id" xsi:type="string">block-main-nav</argument>
</arguments>
</block>
</container>
</container>
</container>
</container>
<block class="Magento\Checkout\Block\Cart\Sidebar" name="minicart" as="minicart" after="logo" template="cart/minicart.phtml">
<arguments>
<argument name="jsLayout" xsi:type="array">
<item name="types" xsi:type="array"/>
<item name="components" xsi:type="array">
<item name="minicart_content" xsi:type="array">
<item name="component" xsi:type="string">Magento_Checkout/js/view/minicart</item>
<item name="config" xsi:type="array">
<item name="template" xsi:type="string">Magento_Checkout/minicart/content</item>
</item>
<item name="children" xsi:type="array">
<item name="subtotal.container" xsi:type="array">
<item name="component" xsi:type="string">uiComponent</item>
<item name="config" xsi:type="array">
<item name="displayArea" xsi:type="string">subtotalContainer</item>
</item>
<item name="children" xsi:type="array">
<item name="subtotal" xsi:type="array">
<item name="component" xsi:type="string">uiComponent</item>
<item name="config" xsi:type="array">
<item name="template" xsi:type="string">Magento_Checkout/minicart/subtotal</item>
</item>
</item>
</item>
</item>
<item name="extra_info" xsi:type="array">
<item name="component" xsi:type="string">uiComponent</item>
<item name="config" xsi:type="array">
<item name="displayArea" xsi:type="string">extraInfo</item>
</item>
</item>
<item name="promotion" xsi:type="array">
<item name="component" xsi:type="string">uiComponent</item>
<item name="config" xsi:type="array">
<item name="displayArea" xsi:type="string">promotion</item>
</item>
</item>
</item>
</item>
</item>
</argument>
</arguments>
<container name="minicart.addons" label="Mini-cart promotion block"/>
</block>
</container>
</referenceContainer>