Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Adobe XF - New Template Type

Avatar

Level 2

Hi guys,

I want to create a new custom template for Adobe Fragments. But I want to apply some clientlibs and allow some custom components (I made to use in "normal templates"), and play around with the configuration.

From a developer approach: is there any way to make a static template and refer the clientlibs within the code.? If so, what should be the steps I should follow.

Thanks in advice, this is a really good forum.

1 Accepted Solution

Avatar

Correct answer by
Level 10


You can use the template editor to create your own template for XF.

It allows you to define clientlibs for template without writing any code.

https://helpx.adobe.com/experience-manager/6-4/sites/authoring/using/templates.html

View solution in original post

4 Replies

Avatar

Correct answer by
Level 10


You can use the template editor to create your own template for XF.

It allows you to define clientlibs for template without writing any code.

https://helpx.adobe.com/experience-manager/6-4/sites/authoring/using/templates.html

Avatar

Level 2

Hi, really thanks edubey.

Unfortunately I need to manage the client-libraries depending on some requirements. For example:

  • when edit-mode = use "ClientLibrari-A"
  • when published = use "ClientLibrari-B"

That's an example, but I used others scenarios... For that reason I need to manage the client libraries from a developer approach.  (I think I can use JSP or Sightly if requiered).

Not sure if I need to create a new XFpage ( the Out of the Box demo is: "/libs/cq/experience-fragments/components/xfpage")

Avatar

Level 10

Why would you want to change the clientlib that is referenced depending whether the page is on Author or Publish. The idea is the site and its components should use same clientlib and have same look and feel on both Author and Publish. Changing clientlibs like this is poor practice.

I recommend going through all sections here for a better idea of AEM -- Getting Started with AEM Sites - WKND Tutorial

Avatar

Level 2

Hi all,

I just implement a new template based on the xfpage (this is Out of the Box implementation). Using dynamic templates (I follow the recommendation from edubey)

So with that the fragments are working properly.

I appreciate your support guys.