0

As much as i try to find an explicit manual over the Liferay 7.2 documentation im not able to get a concrete and "non cryptic" way of implement clay in Liferay 7.2. Just looking forward for some feedback about just how to implement Clay on a Liferay 7.2 theme because everything i have found so far is how great Clay is and how great Clay works with Liferay but no how to implement inside it. Will really appreciate some feedback.

Update:

After a lot of research, this is what i did but now i have JAVA errors (I repeat im a front end dev so im 100% ignorant when it comes to JAVA):

  1. Added this code to my build.gradle in the liferay-workspace directory:

    compileOnly group: "com.liferay", name: "com.liferay.frontend.taglib.soy", version: "1.0.10"

    compileOnly group: "com.liferay", name: "com.liferay.frontend.taglib.clay", version: "1.0.0"

  2. Import the taglib on mi init.jsp (inside liferay-dxp-7.2.10-ga1\tomcat-9.0.17\webapps\ROOT\html\portal) in order to use it in every portlet and webcontent:

And now i'm getting this error:

"The absolute uri: [http://liferay.com/tld/clay] cannot be resolved in either web.xml or the jar files deployed with this application"

Lowtrux
  • 156
  • 2
  • 12
  • 41

1 Answers1

0

You can use Clay using tag library available for it

  1. You need to import compile group: 'com.liferay', name: 'com.liferay.frontend.taglib.clay'.
  2. Then you can use tag lib by importing <%@ taglib uri="http://liferay.com/tld/clay" prefix="clay"%>.
  3. use tag <clay:alert title="test" message="test"/>

You can also use clay without tag lib by using direct html

<div class="alert alert-danger" role="alert">
    <span class="alert-indicator">
        <svg class="lexicon-icon lexicon-icon-exclamation-full" focusable="false" role="presentation">
            <use href="/images/icons/icons.svg#exclamation-full"></use>
        </svg>
    </span>
    <strong class="lead">Error:</strong>This is an error message
</div>

For this you can refer https://v2.clayui.com/docs/components/alerts.html

  • Hey @MohammedYasin, thanks for your feedback: 1. Where do i have to include this code (file, location) 2. Same thing 3. I have tried to use this on a FTL template and is not working (maybe because im not importing things the right way). As a front end dev i have never have to deal with JAVA in order to make some FE Framework work so im totally lost here. – Lowtrux Nov 12 '19 at 08:02
  • As a frontend developer if you want to use clay without Lfieray you could do it using cdn and use clay component in your application. https://next.clayui.com/docs/get-started/how-to-use-clay.html#install-via-clay-css-cdn – Mohammed Yasin Nov 12 '19 at 08:02
  • I need to use it inside liferay, outside liferay is totally clear for me the way i can implement it on my app. – Lowtrux Nov 12 '19 at 08:05
  • Please read my edit from the original question, Apparently im having problems with the taglib. – Lowtrux Nov 12 '19 at 09:37