Expand my Community achievements bar.

SOLVED

Cascading Metadata not displaying when opening existing pages in SITES

Avatar

Level 3

We use cascading metadata in some of our available fields for tagging pages in SITES. The cascading metadata works fine when we first tag pages with new values. However when authors edit existing pages with saved metadata, the cascading metadata does not display with the saved metadata. (see screenshots below)screenshot.pngscreenshot2.png

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @joe_s66,

Can you confirm if you are controlling the display of the highlighted tag field using granite:renderconditions or granite:hide?

It will be helpful if you could share your page dialog to answer appropriately (In particular, Marketing tab or the tag field node)

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @joe_s66,

Can you confirm if you are controlling the display of the highlighted tag field using granite:renderconditions or granite:hide?

It will be helpful if you could share your page dialog to answer appropriately (In particular, Marketing tab or the tag field node)

Avatar

Level 3

Hi,

Please see code snippet below:

<marketing jcr:primaryType="nt:unstructured"
                    jcr:title="Marketing"
   						sling:resourceType="granite/ui/components/foundation/section">
						<layout jcr:primaryType="nt:unstructured"
							sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"
							margin="{Boolean}false" />
						<items jcr:primaryType="nt:unstructured">
							<col1 jcr:primaryType="nt:unstructured"
								sling:resourceType="granite/ui/components/coral/foundation/container"
								listOrder="0">
                            <items jcr:primaryType="nt:unstructured">
								<primarycategory jcr:primaryType="nt:unstructured"
										sling:resourceType="granite/ui/components/foundation/form/select"
										class="cq-dialog-dropdown-showhide cq-dialog-dropdown-showhide-required"
										cq-dialog-dropdown-showhide-target=".type-option-listtype-showhide-target"
										 fieldDescription="Select a primary category for this piece of content. Based on your selection, you will be prompted to add category-specific information."
										fieldLabel="Primary Category" name="./mfs:primaryCategory">
										<items jcr:primaryType="nt:unstructured">
											<select jcr:primaryType="nt:unstructured"
												text="Select Option" value="" />
                                        <productStrategies
                                            jcr:primaryType="nt:unstructured"
                                            text="Product &amp; Strategies"
                                            value="ProductsAndStrategies"/>
                                        <aboutMFS
                                            jcr:primaryType="nt:unstructured"
                                            text="About MFS"
                                            value="AboutMFS"/>
                                        <pracManagement
                                            jcr:primaryType="nt:unstructured"
                                            text="Practice Management"
                                            value="PracticeManagement"/>
                                        <resources
                                            jcr:primaryType="nt:unstructured"
                                            text="Resources"
                                            value="Resources"/>
                                        <insights
                                            jcr:primaryType="nt:unstructured"
                                            text="Insights"
                                            value="Insights"/>
										</items>
									</primarycategory>								
									<productmaterialtype jcr:primaryType="nt:unstructured"
										sling:resourceType="granite/ui/components/foundation/container"
										class="type-option-listtype-showhide-target foundation-layout-util-vmargin"
										showhidetargetvalue="ProductsAndStrategies">
										<items jcr:primaryType="nt:unstructured">
											<role cq:showOnCreate="{Boolean}true"
												jcr:primaryType="nt:unstructured"
												sling:resourceType="cq/gui/components/common/tagspicker"
												fieldLabel="Product Material Type" 
												name="./mfs:productMaterialType"
												rootPath="/content/cq:tags/mfsenterprise/PRCA/PROD/PRCO"
												fieldDescription="Select a material type within the available categories. This is visible to the end user."
												renderReadOnly="{Boolean}true" />
										</items>
									</productmaterialtype>

Avatar

Community Advisor

"Material Type" dialog field is displayed based on the value of "Primary Category" select field. Per the dialog shared, it is handled only for "ProductsAndStrategies" category.

If it is handled and it is not shared here, I suggest to check the class and target value set on the dialog fields. 

You can refer OOB core list component, similar implementation of controlling the display of dialog field based on option selected in select/dropdown resource is available.