How to include component with dialog box on template with sightly? | Community
Skip to main content
Level 3
Nov 15, 2016 9:14 PM UTC
Solved

How to include component with dialog box on template with sightly?

Not sure if these is even possible, but I want to include a component on a template so its on every page by default. But I also want to give content authors the ability to overwrite the content using the dialog box. Is this possible?

Currently,

I'm using this code on my base page template

<div data-sly-resource="${'root' @ resourceType='website/wcm/www/components/global/cu3_contact_bar'}"></div>

While it embeds the component on every page, the component isn't author-able. Any ideas?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
kautuk_sahni
kautuk_sahniAccepted solution
Employee
Nov 16, 2016 6:51 AM UTC

I have also tested it.

When i opened it in Classic UI - i am able to open the dialog however - in Touch UI - it did not open.

Please create a daycare ticket for this.

~kautuk

Kautuk Sahni

7 replies

Level 2
Jan 8, 2019 11:57 AM UTC

Is it resolved in latest release of AEM?

Translate
New Participant
Oct 27, 2021 10:20 PM UTC

I tried something like this

<div data-sly-resource="par"></div> <div data-sly-resource="${'search-results' @ resourceType='path/to/component'}"></div> <div data-sly-resource="${'parafter' @ resourceType='wcm/foundation/components/parsys'}"></div>

 

and it works for me

this <div data-sly-resource="par"></div> allows you to edit

this <div data-sly-resource="${'parafter' @ resourceType='wcm/foundation/components/parsys'}"></div> will add an extra parsys in the bottom

Translate
kautuk_sahni
kautuk_sahniAccepted solution
Employee
Nov 16, 2016 6:51 AM UTC

I have also tested it.

When i opened it in Classic UI - i am able to open the dialog however - in Touch UI - it did not open.

Please create a daycare ticket for this.

~kautuk

Translate
Kautuk Sahni
smacdonald2008
Level 10
Nov 15, 2016 9:51 PM UTC

Yes - file as a bug with support and then test with a classic ui component - try the list component for testing as i have shown. 

Translate
squid267Author
Level 3
Nov 15, 2016 9:45 PM UTC

I can't verify in ClassicUi since the component wasn't made for it. I'll have to add some classic ui only code to render to try. In the meantime, should I file this as a bug with Daycare?

Translate
smacdonald2008
Level 10
Nov 15, 2016 9:33 PM UTC

In Touch UI - the browser throw an error: 

Failed to load resource: the server responded with a status of 500 (Server Error) 

Translate
smacdonald2008
Level 10
Nov 15, 2016 9:31 PM UTC

See:

sample7.html -- http://blogs.adobe.com/experiencedelivers/experience-management/htl-intro-part-1/

<div data-sly-resource="${'par' @ resourceType='foundation/components/parsys'}"></div>
With data-sly-resource you can include components and resources. In the above sample you include of standard paragraph system in your template.

I tested this too and put this HTL code in a componet:

AEM HTL Example: 
<div data-sly-resource="${'par' @ resourceType='foundation/components/list'}"></div>

When i opened in Classic UI - i was able to open the dialog: 

However - in Touch UI - it did not open

See if you can open in Classic UI view.

Translate