I'm working on implementing the Embed V2 component. I want to add a new embedded component to implement Spotify. I've copied the YouTube component and changed the field names in the dialog. I'm having issues with getting things to show properly.
I have the YouTube and Spotify components under the /apps/acs-commons/components/content/embeddable folder in the JCR. I can see them in the page template's properties for the Embed component. After adding them to the template policy and configuring the settings a default values, I can then add them to a page using the template.
Then when I open the Embed dialog to configure which feature I want to embed, I can select "Embeddable" from the radio buttons. Then when I select either YouTube or Spotify, the component properties aren't shown so that I can select the ID for the video/audio or any of the other settings.
If I set the sling:resourceSuperType to the V2 version of the Embed component, nothing shows. I have applied the core.wcm.components.all-2.20.6 update so the Embed V2 should be up to date but it still doesn't seem to work as expected.
Ideas on what I can do to fix this?
Solved! Go to Solution.
Views
Replies
Total Likes
Glad that it worked for you.
I agree with you that, the answer should be marked by Author if it is correct or not, in case author don't do for long and moderator feel that's the correct one then it is ok to mark correct
Hi,
I have created the custom emabdable e.g. googlemap or iframe,
My component looks like below
/aaps/mycomp/components/content/embed/embeddable/googlemap
<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="cq:Component" jcr:title="Google Map" sling:resourceSuperType="core/wcm/components/embed/v1/embed/embeddable" componentGroup=".hidden"/>
dialog
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<location
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textarea"
cols="{Long}3"
fieldDescription="Location"
fieldLabel="Location"
name="./loc"/>
</items>
<granite:data
jcr:primaryType="nt:unstructured"
cmp-embed-dialog-edit-embeddableoptions="true"
cmp-embed-dialog-edit-showhidetargetvalue="mycomp/components/content/embed/embeddable/googlemap"/>
</jcr:root>
I noticed that you are extending the V1 embeddable. Are you also using the V1 Embed component?
Yes, when I implemented this, I was using V1, there were no V2 available.
Part of the issue is that I have been tasked with implementing the V2 component. It looks like the code is still tied to the core/wcm/components/embed/v1/embed/embeddable resource type. I have the definitions in the /apps/acs-commons/components/content/embeddable folder. If I have the sling:resourceSuperType set to core/wcm/components/embed/v2/embed/embeddable then the components aren't listed in the design dialog for setting template properties.
The next issue is that I have to place the compnent dialog in the /apps/acs-commons/components/content/embeddable but if I cannot create a package from my Maven project to auto deploy the component. Is there a mechanism to either allow components from my project component folder(s)?
I'm not fond of people who post their answer and automatically mark it as the answer. Though this does, in a round about way answer some questions I had, I wouldn't call it the full answer.
@Robert-Harper
I am not the one who can mark and unmark the correct answer. I know there are many answered which are marked correct even without confirmation.
@kautuk_sahni can you please look into this concern.
But I have shared with you how I did it and it worked as you can see on screenshot. I hope this help you out to understand how core component embed component works.
If you have questions related to bug or different was of working of V1 and V2, you can also open issue at https://github.com/adobe/aem-core-wcm-components/issues
I figured out what my issue was. There is a much more simple answer to why I was having issues and I found I didn't have to have the component live in the /apps/acs-commons folder for it to work. Like I said, though your code does show a solution, the issue I was having was a very simple one that is easily missed in the solution you provided.
What fixed my issue was simply changing the value of the
cmp-embed-dialog-edit-showhidetargetvalue
property in my design dialog and edit dialog to where my component lives in the apps root. I'm still going to test what happens if I change the embed component's version.
Answering my question with the above issue would be so much clearer and less work. The actual part that was the problem gets lost in the scope of your answer.
Sorry but that is just how I feel. I still don't like people saying that their solution is THE answer. Most of the time when someone has done this, they didn't even answer the question that was asked and was not an actual correction or the correct information. Just my opinion. I think the person asking the question should be the one to say if a response resolves their question.
Glad that it worked for you.
I agree with you that, the answer should be marked by Author if it is correct or not, in case author don't do for long and moderator feel that's the correct one then it is ok to mark correct
Views
Likes
Replies