Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Related Document IMAGE (Blog) View modes: 
User avatar
Member
Member
alexo - 2/28/2013 4:00:26 AM
   
Related Document IMAGE (Blog)
Hi,

another day, another problem ;)

I want to display a teaser image to a related document - currently i am using the "related document-webpart" to get the link, which works. But how can i display an image of the related document?!

Thanks,

best regards,

Alex

User avatar
Certified Developer 13
Certified Developer 13
kentico_josefd - 3/4/2013 3:34:47 AM
   
RE:Related Document IMAGE (Blog)
Hello,

Unfortunately this is not possible with the Related Documents web part, as the fields it can list are limited. However you can achieve the same behaviour by using the Repeater web part and setting it's relationship properties to list only related documents. Let me know if you need any further help.

Regards,
Josef Dvorak

User avatar
Member
Member
alexo - 3/4/2013 7:28:34 AM
   
RE:Related Document IMAGE (Blog)
Hi Josef,

thanks for the hint. I have already tried this solution but it does not work...maybe you can help me. These are my webpart settings:
Default

Web part control ID: repeater

Web part title: Related Documents

Disable view state: False

Disable macros: False


Visibility


Visible: True

Hide on subpages: False

Show for document types: CMS.BlogPost

Display to roles:


Content


Path: /%

Data source name:


Content filter


Document types: CMS.BlogPost

Category name:

Combine with default culture:

Culture code:

Maximum nesting level: -1

ORDER BY expression:

Select only published: True

Select top N documents:

Site name:

WHERE condition:

Columns:

Filter out duplicate documents: False

Filter name:


Transformations


Transformation: CMS.BlogPost.RelatedPosts

Alternating transformation:

Selected item transformation: CMS.BlogPost.RelatedPosts

Item separator:

Nested controls ID:


Paging


Enable paging: False

Paging mode: querystring

Navigation buttons: split

Pager position: bottom

Page size: 10

Query string key:

Show first and last buttons: True

HTML before:

HTML after:

Results position: top

Numbers separator: -


Relationships


Main document: 11111111-1111-1111-1111-111111111111

Main document is on the left side: True

Relationship name: isrelatedto


System settings


Check permissions: False

Cache item name:

Cache minutes:

Cache dependencies: ##DEFAULT##



No data behavior


Hide if no record found: True

No record found text: No data found


Editing buttons


Show New button: False

New button text:

Show Edit and Delete buttons: False


Web part container


Web part container:

Web part container title:

Container CSS class:

Container custom content:


HTML Envelope


Content before:

Content after:


Web part container


Web part container:

Web part container title:

Container CSS class:

Container custom content:

Hide container on subpages: False


HTML Envelope


Content before:

Content after:


AJAX


Use update panel: False


Time zones


Time zone: inherit

Custom time zone:


Partial caching


Partial cache minutes:

Partial cache dependencies: ##DEFAULT##

Thank you!

Alex

User avatar
Certified Developer 13
Certified Developer 13
kentico_josefd - 3/5/2013 8:54:16 AM
   
RE:Related Document IMAGE (Blog)
Hello,

Could you try to remove these properties and see if it helps?
Show for document types: CMS.BlogPost
Selected item transformation: CMS.BlogPost.RelatedPosts
If it doesn't, try using the following transformation and see if you get any kind of output or just "Nothing":
<h4><%# Eval("DocumentName") %></h4>
<%# IfEmpty(Eval("BlogPostTeaser"), "Nothing", "Image: " + GetImage("BlogPostTeaser",200) + "<br> Guid: " + Eval("BlogPostTeaser")) %><br>
<hr>

Regards,
Josef Dvorak

User avatar
Member
Member
alexo - 3/6/2013 9:13:30 AM
   
RE:Related Document IMAGE (Blog)
Thank you Joesef,

this solved my problem.

remove:
Selected item transformation: CMS.BlogPost.RelatedPosts

regards,

Alex