I want to check the basic service if formatted text formatting is enabled in a multi-line field or not.
If I analyze the source of the circuit after turning on the formatted text format, a lot of tags will be added for this purpose: -
<tcm:Size xmlns:tcm="http://www.tridion.com/ContentManager/5.0">2</tcm:Size> <tcm:FilterXSLT xmlns:tcm="http://www.tridion.com/ContentManager/5.0"> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output omit-xml-declaration="yes" method="xml" cdata-section-elements="script"></xsl:output> <xsl:template name="FormattingFeatures"> <FormattingFeatures xmlns="http://www.tridion.com/ContentManager/5.2/FormatArea"> <Doctype>Transitional</Doctype> <AccessibilityLevel>0</AccessibilityLevel> <DisallowedActions></DisallowedActions> <DisallowedStyles></DisallowedStyles> </FormattingFeatures> </xsl:template> <xsl:template match="/ | node() | @*"> <xsl:copy> <xsl:apply-templates select="node() | @*"></xsl:apply-templates> </xsl:copy> </xsl:template> <xsl:template match="/body[not(processing-instruction() or comment() or normalize-space(translate(., ' ', '')) != '' or *[@* or * or comment() or processing-instruction() or not(self::p or self::br)])]"> <xsl:copy></xsl:copy> </xsl:template> <xsl:template match="p[not(@* or * or comment() or processing-instruction() or normalize-space(translate(., ' ', '')) != '' or following-sibling::node()[@* or * or comment() or processing-instruction() or not(self::p or self::text()) or normalize-space(translate(., ' ', '')) != ''])]"> </xsl:template> </xsl:stylesheet> </tcm:FilterXSLT>
But it is this property that makes it possible to find whether expanded text is included. I canβt understand even in the core service API document.
My main service code is a bit like below: -
SessionAwareCoreService2010Client client = new SessionAwareCoreService2010Client(); client.ClientCredentials.Windows.ClientCredential.UserName = "myUserName"; client.ClientCredentials.Windows.ClientCredential.Password = "myPassword"; client.Open(); SchemaFieldsData fields = client.ReadSchemaFields("tcm-xyz", true, new ReadOptions()); foreach (var field in fields.Fields) { if (field is MultiLineTextFieldDefinitionData) { return Constants.DataType.STRING; } }
Please offer.
source share