Main Content

Magnolia Community Forums: Get help with Magnolia: Gettintg the URL of an image from a dialog


  • FbSegovia
    FbSegovia
    Full name: Francisco de Borja Segovia
    Posts: 12
    Last post: Dec 5, 2017 4:01:22 PM
    Registered on: Nov 14, 2017
    Gettintg the URL of an image from a dialog
    #1 by FbSegovia on Dec 5, 2017 2:57:51 PM

    Hello, recently i have been tasked to create a dialog to create the meta data of a Twitter Card type summary, i have created the dialog and worked all the data into the meta datas os a JSP but i have encountered a problem with the image.

    I have to get the URL of the image in order to finish the Twitter card but i seem unable to find the correct way to achive it. I think that i should use:
    ${cmsfn.link(content)}

    But i have tried this way:
    <meta name="twitter:imagePRUEBALink" content="${cmsfn.link(newsImage)}" />
    being newsImage the "name" that i assigned to the image that is selected in the dialog.

    and i get this error:
    Caused by: javax.el.MethodNotFoundException: Method not found: class info.magnolia.templating.jsp.cmsfn.JspTemplatingFunction.link(java.lang.String)

    Could anyone explain to me the correct way to get the URL from an image.

    Thank you in advance for your trouble.

  • FbSegovia
    FbSegovia
    Full name: Francisco de Borja Segovia
    Posts: 12
    Last post: Dec 5, 2017 4:01:22 PM
    Registered on: Nov 14, 2017
    Re: Gettintg the URL of an image from a dialog
    #2 by FbSegovia on Dec 5, 2017 4:01:22 PM

    I have revised the lib imports in my jsp and i think that they are correct:
    <jsp:root version="2.0"
    xmlns:jsp="http://java.sun.com/JSP/Page"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
    xmlns:cms="http://magnolia-cms.com/taglib/templating-components/cms"
    xmlns:cmst="cms-taglib"
    xmlns:cmsfn="http://magnolia-cms.com/taglib/templating-components/cmsfn"
    xmlns:fn="http://java.sun.com/jsp/jstl/functions"
    xmlns:cmn="http://www.mpt.es/jstl/comun"
    xmlns:mpt="modulo-taglib-mpt">

    i am forgetting something?

You don't have the permission to post on this thread

Sign in

To login on this forum, you can use your Magnolia Forge, Support or Partner account, or, below, your Google, Yahoo! or OpenID account. If you have trouble logging in, or any other sort of issue, please let us know in the Meta forum, on the user-list, or simply by email at forum-admin at magnolia-cms dot com.

* Required

... or sign in with:

  • icon http://{your-openid-url}
  • icon
  • icon https://me.yahoo.com/