Foren

Creating our custom folder under _diffs and placing images into it.

MukeshKumar PG, geändert vor 9 Jahren.

Creating our custom folder under _diffs and placing images into it.

New Member Beiträge: 14 Beitrittsdatum: 26.08.14 Neueste Beiträge
Hi !

I am new to Liferay. I have some clarifications regarding themes development. Under _diffs folder if I create a custom folder called "static" and place the images there; what changes I have to make in portal_normal.vm file ? How I have to set the changes in this file ?
thumbnail
Pankaj Kathiriya, geändert vor 9 Jahren.

RE: Creating our custom folder under _diffs and placing images into it.

Liferay Master Beiträge: 722 Beitrittsdatum: 05.08.10 Neueste Beiträge
Are all images custom/new? Then simply wherever you use it make sure you provide proper relative path for images.
MukeshKumar PG, geändert vor 9 Jahren.

RE: Creating our custom folder under _diffs and placing images into it.

New Member Beiträge: 14 Beitrittsdatum: 26.08.14 Neueste Beiträge
Thanks Pankaj.

All images are new. Instead of placing all those images in images folder of _diffs, am placing it in custom (name of the folder) and placing all those images into it.

To call those images in theme, what relative path i have to specify in portal_normal.vm file ?
karthik reddy, geändert vor 9 Jahren.

RE: Creating our custom folder under _diffs and placing images into it.

Junior Member Beiträge: 60 Beitrittsdatum: 08.04.13 Neueste Beiträge
What exactly you want? You want to call images in jsp (or) VM file?
Try this link to call images in proper way in jsp or vm file Image calling in jsp
If you want to call theme images in jsp Theme images in jsp
MukeshKumar PG, geändert vor 9 Jahren.

RE: Creating our custom folder under _diffs and placing images into it.

New Member Beiträge: 14 Beitrittsdatum: 26.08.14 Neueste Beiträge
Thank you for the reply.

What is the relative path i have to give in VM file ? To be specific, in portal_normal.vm ?
thumbnail
Manali Lalaji, geändert vor 9 Jahren.

RE: Creating our custom folder under _diffs and placing images into it.

Expert Beiträge: 362 Beitrittsdatum: 09.03.10 Neueste Beiträge
Hi,

Try this in portal_normal.vm:

<img src="$images_folder/(your custom folder name)/logo.jpg" alt="testLogo"/>

Refer: Theme Variables Documentation : http://content.liferay.com/4.3/misc/theme-api-4.3.0.html

HTH!
MukeshKumar PG, geändert vor 9 Jahren.

RE: Creating our custom folder under _diffs and placing images into it.

New Member Beiträge: 14 Beitrittsdatum: 26.08.14 Neueste Beiträge
Thank you !

I am trying it !
MukeshKumar PG, geändert vor 9 Jahren.

RE: Creating our custom folder under _diffs and placing images into it.

New Member Beiträge: 14 Beitrittsdatum: 26.08.14 Neueste Beiträge
@Manali: Should i specify anything in liferay-look-and-feel.xml ?
karthik reddy, geändert vor 9 Jahren.

RE: Creating our custom folder under _diffs and placing images into it.

Junior Member Beiträge: 60 Beitrittsdatum: 08.04.13 Neueste Beiträge
Hi Mukhesh,

No need to mention anything just follow the Manali steps it will display.
Other way to call <img src="$themeDisplay.getPathThemeImages()//(custom folder)/image.png" />
If you are not able to display let us know where you are trying to display