掲示板
Image is not getting displayed in web content
12年前 に Apoorva Prakash によって更新されました。
Image is not getting displayed in web content
Liferay Master 投稿: 658 参加年月日: 10/06/15 最新の投稿
Hello All,
I'm using LR6.05.
I'm getting problem in web content using a template. Image is not getting displayed.
But when I'm opening for preview or display, the image is not coming.
I've tried without template too. Same thing is happening.
When I tried to debug it through FireBug, it gives the following URI
I've checked the journalArticleImage table, the imageId is valid... But I was unable to find this struts path in struts-config.xml.
Please reveal some solution.
Thanks and Regards.
I'm using LR6.05.
I'm getting problem in web content using a template. Image is not getting displayed.
But when I'm opening for preview or display, the image is not coming.
I've tried without template too. Same thing is happening.
When I tried to debug it through FireBug, it gives the following URI
/image/journal/article?img_id=26172&t=1320151467035
I've checked the journalArticleImage table, the imageId is valid... But I was unable to find this struts path in struts-config.xml.
Please reveal some solution.
Thanks and Regards.
12年前 に ma bu によって更新されました。
RE: Image is not getting displayed in web content
Junior Member 投稿: 31 参加年月日: 10/05/14 最新の投稿
hi,
by using the follwing HTML tag (in VM Skript), the image/document from document library is displayed properly
in my structure there is a field called "imageURL" (type: Documents and Media) on top level of the structure.
Cheers
by using the follwing HTML tag (in VM Skript), the image/document from document library is displayed properly
<img src="$imageURL">
in my structure there is a field called "imageURL" (type: Documents and Media) on top level of the structure.
Cheers
12年前 に Apoorva Prakash によって更新されました。
RE: Image is not getting displayed in web content
Liferay Master 投稿: 658 参加年月日: 10/06/15 最新の投稿
Hello Ma Bu,
Thanks for your reply..
Can you please tell me, what is the value of $imageURL on the page.
Thanks and Regards.
Apoorva Prakash
Thanks for your reply..
Can you please tell me, what is the value of $imageURL on the page.
Thanks and Regards.
Apoorva Prakash
12年前 に Sagar A Vyas によって更新されました。
RE: Image is not getting displayed in web content
Liferay Master 投稿: 679 参加年月日: 09/04/17 最新の投稿Apoorva Prakash:
Hello All,
I'm using LR6.05.
I'm getting problem in web content using a template. Image is not getting displayed.
But when I'm opening for preview or display, the image is not coming.
I've tried without template too. Same thing is happening.
When I tried to debug it through FireBug, it gives the following URI/image/journal/article?img_id=26172&t=1320151467035
I've checked the journalArticleImage table, the imageId is valid... But I was unable to find this struts path in struts-config.xml.
Please reveal some solution.
Thanks and Regards.
Hi Apoorva,
Two way of displaying image either put it on Structure and access it from template as below
<img height=50px; width=48px; src="$field.DocumentImage.data" />
Here field is name of image field set by you in structure.
or if you wish to access some image from theme then you can get path like below.
#set ($imagePath = $request.get("theme-display").path-theme-images)
Here imagePath will return path upto images folder of theme.
Hope this help
Thanks,
Sagar Vyas
12年前 に Apoorva Prakash によって更新されました。
RE: Image is not getting displayed in web content
Liferay Master 投稿: 658 参加年月日: 10/06/15 最新の投稿
Thanks Ma Bu and Sagar...
It was some other issue, relate with tomcat structuring.
Regards,
Apoorva Prakash
It was some other issue, relate with tomcat structuring.
Regards,
Apoorva Prakash
11年前 に Narendra Dodiya によって更新されました。
RE: Image is not getting displayed in web content
New Member 投稿: 1 参加年月日: 13/02/08 最新の投稿
Hi Sagar A Vyas,
can you describe some more about : $request.get("theme-display").path-theme-images
where theme-display is set and about method path-theme-images ?
can you describe some more about : $request.get("theme-display").path-theme-images
where theme-display is set and about method path-theme-images ?
11年前 に Amit Doshi によって更新されました。
RE: Image is not getting displayed in web content
Liferay Master 投稿: 550 参加年月日: 10/12/29 最新の投稿
Hi Narendra,
From $request, you will be able to find all this variables value.
So, if you were to dump a $request variable from a template it would look like this:
From the above you will be able to find theme-display and also path-theme-images.
For more info refer this link.
Hope it will be useful.
Thanks & Regards,
Amit Doshi
From $request, you will be able to find all this variables value.
So, if you were to dump a $request variable from a template it would look like this:
{ render-url-exclusive=http://localhost:8080/web/workshop/home ?p_p_id=56_INSTANCE_6860&p_p_lifecycle=0 &p_p_state=exclusive&p_p_mode=view& p_p_col_id=column-1&p_p_col_count=1, auth-type=, scheme=http, render-url-normal=http://localhost:8080/web/workshop/home ?p_p_id=56_INSTANCE_6860&p_p_lifecycle=0& p_p_state=normal&p_p_mode=view& p_p_col_id=column-1&p_p_col_count=1, locale=en_US, attributes={ COMPANY_ID=10095, PORTLET_ID=56_INSTANCE_6860, RENDER_PORTLET_COLUMN_POS=0, CURRENT_COMPLETE_URL=http://localhost:8080/web/workshop/home, LAST_PATH={ contextPath=/web, path=/workshop/home }, FRIENDLY_URL=/web/workshop/home, com.liferay.portal.servlet.filters.strip.StripFilterSKIP_FILTER=true, PORTLET_PARALLEL_RENDER=true, RENDER_PORTLET_COLUMN_ID=column-1, LAYOUT_FRIENDLY_URL=/home, CURRENT_URL=/web/workshop/home, RENDER_PORTLET_COLUMN_COUNT=1, org.apache.struts.action.mapping.instance=ActionConfig [path=/journal_content/view, scope=session, type=com.liferay.portlet.journalcontent.action.ViewAction, validate=true,cancellable=false, LIFERAY_SHARED_PAGE_KEYWORDS=[ad], USER_ID=10150, PORTLET_STRUTS_ACTION=/journal_content/view, com.liferay.portal.servlet.filters.gzip.GZipFilterSKIP_FILTER=true }, render-url-pop-up=http://localhost:8080/web/workshop/home ?p_p_id=56_INSTANCE_6860&p_p_lifecycle=0& p_p_state=pop_up&p_p_mode=view&p_p_col_id=column-1 &p_p_col_count=1, render-url-maximized=http://localhost:8080/web/workshop/home ?p_p_id=56_INSTANCE_6860&p_p_lifecycle=0& p_p_state=maximized&p_p_mode=view& p_p_col_id=column-1&p_p_col_count=1, render-url-minimized=http://localhost:8080/web/workshop/home ?p_p_id=56_INSTANCE_6860&p_p_lifecycle=0& p_p_state=minimized&p_p_mode=view& p_p_col_id=column-1&p_p_col_count=1, server-port=8080, portlet-mode=view, secure=false, action=false, theme-display={ secure=false, scope-group-id=10174, portal-url=localhost:8080, plid=10265, path-main=/c, i18n-language-id=, url-portal=localhost:8080, do-as-user-id=, path-context=, path-image=/image, user-id=10150, language-id=en_US, company-id=10095, locale=en_US, time-zone=UTC, path-friendly-url-public=/web, path-theme-images=/sesameworkshop-theme/images, real-user-id=10150, cdn-host=, path-friendly-url-private-group=/group, server-name=localhost, path-friendly-url-private-user=/user, server-port=8080, portlet-display={ title=Journal Content, portlet-name=56, instance-id=6860, resource-pk=10265_LAYOUT_56_INSTANCE_6860, root-portlet-id=56, id=56_INSTANCE_6860 } }, parameters=, container-type=portlet, context-path=/, content-type=text/html, render-url=http://localhost:8080/web/workshop/home ?p_p_id=56_INSTANCE_6860&p_p_lifecycle=0& p_p_state=normal&p_p_mode=view& p_p_col_id=column-1&p_p_col_count=1, remote-user=10150, window-state=normal, server-name=localhost, container-namespace=/, portlet-session={ portlet-attributes=, application-attributes={ com.liferay.portal.kernel.util.ProgressTracker_PERCENT=100, j_username=10150, HTTPS_INITIAL=false, LIFERAY_SHARED_VISITED_GROUP_ID_PREVIOUS=10100, LAST_PATH={ contextPath=/web, path=/workshop/home }, USER_ID=10150, LIFERAY_SHARED_VISITED_GROUP_ID_RECENT=10174, org.apache.struts.action.LOCALE=en_US } }, portlet-namespace=_56_INSTANCE_6860_, portlet-session-id=1D8EA0980982E0C4DD5199B092450A2E } }}}
From the above you will be able to find theme-display and also path-theme-images.
For more info refer this link.
Hope it will be useful.
Thanks & Regards,
Amit Doshi
11年前 に Sagar A Vyas によって更新されました。
RE: Image is not getting displayed in web content
Liferay Master 投稿: 679 参加年月日: 09/04/17 最新の投稿Narendra Dodiya:
Hi Sagar A Vyas,
can you describe some more about : $request.get("theme-display").path-theme-images
where theme-display is set and about method path-theme-images ?
Narendra,
As precisely described by Amit.
Just wanted to add on top of this is like " $request " it is not actual object we are pointing in Template.
It is just a Map you can say with key and value.
so if you want to access any value[in our example its theme's image path]you should know key[in our example its theme-display].
And if you want to know all keys and value as per Amit said display $request object you will get idea
HTH
Thanks,
Sagar Vyas