Expand my Community achievements bar.

SOLVED

AEM 6.2 Content Fragment Variations triggered by Responsive Layouts - Possible?

Avatar

Level 1

I've been playing around with content fragments and am wondering if it's possible to have the fragment variations tie to specific responsive layouts

I created a fragment and 3 variations (main, tablet and mobile) When I toggle the responsible emulator, I'm only seeing the main variation. I was wondering if there's a way to tie the 2 together

Please advise

1 Accepted Solution

Avatar

Correct answer by
Administrator

I guess the use-case that you are trying to achieve is not possible with Content fragment. 

Variations are designed for difference in channels (or, to a lesser extent, audiences). In this case, you are talking about a single channel (a website). 

I would suggest you write custom component for this.

~kautuk



Kautuk Sahni

View solution in original post

3 Replies

Avatar

Administrator

Hi 

For full details about content fragment, i would recommend you fo go through this PDF:-

Link:- https://adobesummit.lanyonevents.com/2016/connect/fileDownload/session/76E56C0977D866C5D1A22CB406B3C...

// This covers all the major aspect of Content fragment.

Coming back your question, there we need to modify content fragment component configuration. Click to wrench icon -> open component dialog -> in variation drop-down select mobile as a variation name.

Step by step approach is given in this PDF.

I hope this would help you.

~kautuk



Kautuk Sahni

Avatar

Level 1

Thanks for the response however this doesn't answer my question

I've already gone thru this document several times and haven't been able to find anything regarding my inquiry

I understand that you can change variations with the content fragment but what I'm looking for is to have the variations tied to specific breakpoints on the same page. For example, on desktop view I'm using the MAIN variation. When i switch to Tablet I switch the fragment to TABLET variation. When I toggle back to desktop view, it's showing the tablet variation whereas I was hoping it'd show the MAIN variation

Avatar

Correct answer by
Administrator

I guess the use-case that you are trying to achieve is not possible with Content fragment. 

Variations are designed for difference in channels (or, to a lesser extent, audiences). In this case, you are talking about a single channel (a website). 

I would suggest you write custom component for this.

~kautuk



Kautuk Sahni