[MGNLSTK-1417] logoImg Property Created: 12/Aug/14  Updated: 02/Jul/18  Resolved: 02/Jul/18

Status: Closed
Project: Magnolia Standard Templating Kit (closed)
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Roman Schaltegger Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File logoimg.png    
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:

 Description   

I have an issue with the standard logo-area, which comes with Magnolia-STK.

I've created a custom template using freemarker script. Everything works fine, except loading the logoImg Property.

The Page-Properties-Dialog pops up without any problem and assigning a logo-image works as well ( JCR creates a link ) but the logo wont show up on the page.

I checked my console and found this:
2014-08-12 15:40:26,272 WARN .module.templatingkit.templates.pages.STKPageModel: No logoImg property found under Node /
2014-08-12 15:40:26,272 WARN .module.templatingkit.templates.pages.STKPageModel: No printLogoImg property found under Node /

Thanks in advance



 Comments   
Comment by Philip Mundt [ 12/Aug/14 ]

It looks as if you're trying to get the property from the root node "/", where it is not stored.
Make sure you pass the correct content node to the model's function.

Please also provide the ftl template + the version of Magnolia you're working with.

Comment by Roman Schaltegger [ 13/Aug/14 ]

I'm using Magnolia Version 5.3.1 and the standard logo-template which looks like this:

assign pageModel = model.root!

[#-- Assigns: The content for the logo --]
assign inhContent = cmsfn.inherit(content)!
assign homeName = stkfn.homeName(content)!
assign homeTitle = stkfn.homeTitle(content)Unable to render embedded object: File (homeName) not found.
assign siteTitle = stkfn.siteTitle(content)Unable to render embedded object: File (homeTitle) not found.
assign logoImageLink = pageModel.logoImageLink!
assign printLogoImageLink = pageModel.printLogoImageLink!logoImageLink!
assign logoAltText = inhContent.alternativeLogoText!siteTitle!

<div id="logo">
<a href="${stkfn.homeLink(content)}" title="${i18n['logo.title']}">
if logoImageLink?has_content<img src="${logoImageLink}" alt="${logoAltText}" />/#if
<span></span>
</a>
</div><!-- end logo -->

I really appreciate your help!

Comment by Philip Mundt [ 14/Aug/14 ]

Hey Roman. Is the original logoImg property (incl. the original template) not working?
If it is, I would ask you to use our forums (http://forum.magnolia-cms.com) to get some help there rather than filing a bug!?

Comment by Philip Mundt [ 14/Aug/14 ]

Another hint might be:

  • Is your root page (e.g. /home) (where the image is attached) of category "home" (Home template)?
  • Please checkout info.magnolia.module.templatingkit.functions.STKTemplatingFunctions to see how it works.
Comment by Jan Haderka [ 02/Jul/18 ]

STK have been deprecated in September 2017. As part of this project nearing end-of-life, we are not planning to fix any of the existing issues except for the critical security issues. For more details, please consult documentation.

Generated at Mon Feb 12 07:36:22 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.