Question

I'm customizing my liferay theme for my own portal, I'm copy portal_normal.ftl from classic theme to _diffs/templates and I saw this code :

<a class="${logo_css_class}" href="${site_default_url}" title="<@liferay.language key="go-to" /> ${site_name}">
    <img alt="${logo_description}" height="${site_logo_height}" src="${site_logo}" width="${site_logo_width}" />
</a>

I want to change the src from ${site_logo} to a direct url like /images/blahblah.png but it doesn't work, so how do i change the picture in this img tag ?

And where did the liferay define ${site_logo} ?

Thanks in advance.

Was it helpful?

Solution

You find ${site_logo} in a file "init.ftl". This file is in: liferay-portal-src-6.2.0-ce-ga1\portal-web\docroot\html\themes_unstyled\templates\init.ftl

To change the src, include in init_custom.ftl #set ($company_logo_src = "$images_folder/yourlogo.png"). Then in your portal_normal the tag img put src="$company_logo_src"

$images_folder is going to take the logo from folder images (of your theme). This var exist in init.ftl and have this value $theme_display.getPathThemeImages()

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top