Main Content

Magnolia Community Forums: Get help with Magnolia: SVG inlining


  • Tim
    Tim
    Full name: Тимофей Самарский
    Posts: 75
    Last post: Jan 5, 2017 12:21:41 AM
    Registered on: Jul 14, 2015
    SVG inlining
    #1 by Tim on Jan 4, 2017 11:36:43 PM

    Hello.

    I'am trying to inline SVG from DAM. But for now i do not understand how to do it. Can you help me?

    As another solution i think to use BasicUploadFieldDefinition for svg field. But i don't foud solution for OCM mgnl:resource field. Is it exist?

  • Tim
    Tim
    Full name: Тимофей Самарский
    Posts: 75
    Last post: Jan 5, 2017 12:21:41 AM
    Registered on: Jul 14, 2015
    Re: SVG inlining
    #2 by Tim on Jan 5, 2017 12:21:41 AM

    Solution found.

    AssetRendition assetRendition = damTemplatingFunctions.getRendition(IMAGE_ID, ImagingSupport.VARIATION_ORIGINAL);
    if(assetRendition != null){
    MgnlContext.setAttribute(SVG_IMAGE, IOUtils.toString(assetRendition.getStream()));
    }

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/