<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Fetch Page information in Another page through dialog. in Adobe Experience Manager Questions</title>
    <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/fetch-page-title-description-thumbnail-image-of-one-page-in/m-p/461407#M133101</link>
    <description>&lt;P&gt;&lt;LI-USER uid="17507726"&gt;&lt;/LI-USER&gt;&amp;nbsp;Yes its possible to do in the sling model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;@Model(adaptable=Resource.class)&lt;/P&gt;&lt;P&gt;public class TestClass {&lt;/P&gt;&lt;P&gt;@Self&lt;/P&gt;&lt;P&gt;Resource resource;&lt;/P&gt;&lt;P&gt;@PostConstruct&lt;/P&gt;&lt;P&gt;public void init() {&lt;/P&gt;&lt;P&gt;&amp;nbsp; PageManager pm = resource.getResourceResolver().adaptTo(PageManager.class);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Page containingPage = pm.getContainingPage (resource);&lt;/P&gt;&lt;P&gt;&amp;nbsp; ValueMap pageProperties = containingPage.getProperties();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;map the properties to variables and then use it in the HTL.&lt;/P&gt;</description>
    <pubDate>Mon, 18 Jul 2022 17:14:20 GMT</pubDate>
    <dc:creator>ManuMathew1994</dc:creator>
    <dc:date>2022-07-18T17:14:20Z</dc:date>
    <item>
      <title>Fetch Page title, description, thumbnail image of one page  in Another page through dialog.</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/fetch-page-title-description-thumbnail-image-of-one-page-in/m-p/461340#M133073</link>
      <description>&lt;P&gt;Hello all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a component which should accept only page path through cq:dialog. When I select the page and click submit through dialog then it should print all the page properties like title, description&amp;amp; image or image url . Is it possible ??&lt;/P&gt;&lt;P&gt;&amp;nbsp;Here is my component dialog:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tessa_learner1_0-1658145592483.png" style="width: 400px;"&gt;&lt;img src="https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/43151i287C9D92DD491305/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="Tessa_learner1_0-1658145592483.png" alt="Tessa_learner1_0-1658145592483.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 10:52:02 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/fetch-page-title-description-thumbnail-image-of-one-page-in/m-p/461340#M133073</guid>
      <dc:creator>Tessa_learner1</dc:creator>
      <dc:date>2022-07-19T10:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Page information in Another page through dialog.</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/fetch-page-title-description-thumbnail-image-of-one-page-in/m-p/461342#M133075</link>
      <description>&lt;P&gt;You can write a sling model for custom component. Using resource resolver you can get resource and adapt to Page. Once you adaptTo Page, you can iterate all properties. Please refer below links for more details.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/com/day/cq/wcm/api/Page.html#getProperties--" target="_blank"&gt;https://developer.adobe.com/experience-manager/reference-materials/6-5/javadoc/com/day/cq/wcm/api/Page.html#getProperties--&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;experienceleague.adobe.com/docs/experience-manager-65/developing/platform/sling-adapters.html?lang=en&lt;/LI&gt;&lt;LI&gt;&lt;A href="http://www.aemcq5tutorials.com/tutorials/adobe-aem-cq5-tutorials/sling-model-sightly-aem/" target="_blank"&gt;http://www.aemcq5tutorials.com/tutorials/adobe-aem-cq5-tutorials/sling-model-sightly-aem/&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Mon, 18 Jul 2022 12:21:21 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/fetch-page-title-description-thumbnail-image-of-one-page-in/m-p/461342#M133075</guid>
      <dc:creator>sachinarora</dc:creator>
      <dc:date>2022-07-18T12:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Page information in Another page through dialog.</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/fetch-page-title-description-thumbnail-image-of-one-page-in/m-p/461407#M133101</link>
      <description>&lt;P&gt;&lt;LI-USER uid="17507726"&gt;&lt;/LI-USER&gt;&amp;nbsp;Yes its possible to do in the sling model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;@Model(adaptable=Resource.class)&lt;/P&gt;&lt;P&gt;public class TestClass {&lt;/P&gt;&lt;P&gt;@Self&lt;/P&gt;&lt;P&gt;Resource resource;&lt;/P&gt;&lt;P&gt;@PostConstruct&lt;/P&gt;&lt;P&gt;public void init() {&lt;/P&gt;&lt;P&gt;&amp;nbsp; PageManager pm = resource.getResourceResolver().adaptTo(PageManager.class);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Page containingPage = pm.getContainingPage (resource);&lt;/P&gt;&lt;P&gt;&amp;nbsp; ValueMap pageProperties = containingPage.getProperties();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;map the properties to variables and then use it in the HTL.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 17:14:20 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/fetch-page-title-description-thumbnail-image-of-one-page-in/m-p/461407#M133101</guid>
      <dc:creator>ManuMathew1994</dc:creator>
      <dc:date>2022-07-18T17:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Page information in Another page through dialog.</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/fetch-page-title-description-thumbnail-image-of-one-page-in/m-p/461541#M133126</link>
      <description>&lt;P&gt;1. &lt;STRONG&gt;Page path field in Component touch ui dialog editor -&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DEBAL_DAS_0-1658224452606.png" style="width: 400px;"&gt;&lt;img src="https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/43221iD04FA2FF71431565/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="DEBAL_DAS_0-1658224452606.png" alt="DEBAL_DAS_0-1658224452606.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2. Sling model -&lt;/P&gt;&lt;PRE&gt;package com.aem.demo.core.models;

import java.util.Map;

import javax.annotation.PostConstruct;

import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceResolver;
import org.apache.sling.api.resource.ValueMap;
import org.apache.sling.models.annotations.DefaultInjectionStrategy;
import org.apache.sling.models.annotations.Model;
import org.apache.sling.models.annotations.injectorspecific.SlingObject;
import org.apache.sling.models.annotations.injectorspecific.ValueMapValue;

import com.day.cq.wcm.api.Page;
import com.day.cq.wcm.api.PageManager;


@Model(adaptables = Resource.class , defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL)
public class PagePropertydetailModel {

	@ValueMapValue
	private String pagepath;
	
	@SlingObject
    private ResourceResolver resourceResolver;
	
	private Map&amp;lt;String,Object&amp;gt; pageProperties;
	
	@PostConstruct
	protected void init() {
		
		
		PageManager pageManager = resourceResolver.adaptTo(PageManager.class);
		Page page = pageManager.getPage(pagepath);
		pageProperties = page.getProperties();
		
		
		
		
		
	}

	public Map&amp;lt;String, Object&amp;gt; getPageProperties() {
		return pageProperties;
	}
}&lt;/PRE&gt;&lt;P&gt;3. &lt;STRONG&gt;Htl code&lt;/STRONG&gt; -&lt;/P&gt;&lt;PRE&gt;Page Information&amp;lt;/br&amp;gt;

&amp;lt;div data-sly-use.map="com.aem.demo.core.models.PagePropertydetailModel"&amp;gt;

  &amp;lt;sly data-sly-list="${map.pageProperties.keySet.iterator}"&amp;gt;

     &amp;lt;li&amp;gt;key = ${item}&amp;lt;/li&amp;gt;    
      ${map.pageProperties[item]}


   &amp;lt;/sly&amp;gt;

&amp;lt;/div&amp;gt;&lt;/PRE&gt;&lt;P&gt;4. &lt;STRONG&gt;Rendered data as shown below&lt;/STRONG&gt;&amp;nbsp; -&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DEBAL_DAS_1-1658224664228.png" style="width: 400px;"&gt;&lt;img src="https://experienceleaguecommunities.adobe.com/t5/image/serverpage/image-id/43224iD277197AC85D576B/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="DEBAL_DAS_1-1658224664228.png" alt="DEBAL_DAS_1-1658224664228.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Just shared the idea. I will update logic for Date field like&amp;nbsp;&lt;STRONG&gt;jcr:created &lt;/STRONG&gt;and&lt;STRONG&gt;&amp;nbsp;&lt;SPAN&gt;cq:lastModified&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 09:59:16 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/fetch-page-title-description-thumbnail-image-of-one-page-in/m-p/461541#M133126</guid>
      <dc:creator>DEBAL_DAS</dc:creator>
      <dc:date>2022-07-19T09:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Page information in Another page through dialog.</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/fetch-page-title-description-thumbnail-image-of-one-page-in/m-p/461556#M133132</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;LI-USER uid="1832459"&gt;&lt;/LI-USER&gt;&amp;nbsp; Thank you for the help. I just need to elaborate my query actually I'm having an article page with title, description &amp;amp; image. So when I configure that article page path in dialog it should get the corresponding title, description &amp;amp; image(thumbnail image if it's have ) Can I do this with the above code ??&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 10:50:17 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/fetch-page-title-description-thumbnail-image-of-one-page-in/m-p/461556#M133132</guid>
      <dc:creator>Tessa_learner1</dc:creator>
      <dc:date>2022-07-19T10:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Page information in Another page through dialog.</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/fetch-page-title-description-thumbnail-image-of-one-page-in/m-p/461561#M133134</link>
      <description>&lt;P&gt;Please correct me after configuring the&amp;nbsp;&lt;SPAN&gt;article page in dialog editor , you want to&amp;nbsp;get the corresponding title, description &amp;amp; image(thumbnail image if it's have )&amp;nbsp;in dialog editor right?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 11:39:52 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/fetch-page-title-description-thumbnail-image-of-one-page-in/m-p/461561#M133134</guid>
      <dc:creator>DEBAL_DAS</dc:creator>
      <dc:date>2022-07-19T11:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch Page information in Another page through dialog.</title>
      <link>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/fetch-page-title-description-thumbnail-image-of-one-page-in/m-p/461567#M133135</link>
      <description>&lt;P&gt;&lt;LI-USER uid="1832459"&gt;&lt;/LI-USER&gt;&amp;nbsp; Yes, correct.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2022 12:08:39 GMT</pubDate>
      <guid>https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/fetch-page-title-description-thumbnail-image-of-one-page-in/m-p/461567#M133135</guid>
      <dc:creator>Tessa_learner1</dc:creator>
      <dc:date>2022-07-19T12:08:39Z</dc:date>
    </item>
  </channel>
</rss>

