Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Lists using DocumentDataSource and BasicRepeater View modes: 
User avatar
Member
Member
lawrence.dine-moov2 - 5/25/2012 5:09:42 AM
   
Lists using DocumentDataSource and BasicRepeater
Hello,

I'm trying to create a few different types of pages but for this post I'll simplify it to a listing page and a viewing page for a given document's content.

I have my DocumentType called BasicPage which has Title, Description and Content fields and I have viewing pages working fine for these using a DocumentsDataSource and a Repeater combined with a transformation that pulls all the content out.

My problem comes now when I try to create a listing page. I create a BasicPage document in the tree and add some BasicPage children under it then I set my PageTemplate to my listing page. The listing page again has a DocumentsDataSource that pulls out the title, description and content the same as on a viewing page but this time it also has another repeater that should list all the child documents using a transformation that puts the document link and title inside an li.

The issue I'm having is that the second (list) documents data source and repeater (that I've fiddled with the properties of at great length) refuses to display anything but a link straight back to the current document. It never lists the child documents at all no matter what I set it to! I even tried having just one datasource and telling it to retrieve everything then set up the repeaters to limit it but it still just returns the current document.

Now I would just assume that it was impossible to achieve this with these web parts but I had it working before when I had a ListPage document type and a ViewPage document type.

How can I make this work?

Thanks,
Lawrence

User avatar
Kentico Support
Kentico Support
kentico_janh - 5/25/2012 5:22:45 AM
   
RE:Lists using DocumentDataSource and BasicRepeater
Hello,

Please check if you have set the Enable selected item property of your list documents datasource web part to false, because if it is checked, the datasource will provide only the currently selected document - if its type is included in the 'Document types' property.

Best regards,
Jan Hermann

User avatar
Member
Member
lawrence.dine-moov2 - 5/25/2012 5:57:49 AM
   
RE:Lists using DocumentDataSource and BasicRepeater
Yep, I've tried that. I've fiddled with all of the relevant settings at length. Read every tooltip and tried just about every variation.

Could this be a bug?

User avatar
Kentico Support
Kentico Support
kentico_janh - 5/25/2012 6:16:46 AM
   
RE:Lists using DocumentDataSource and BasicRepeater
Hello,

It totally should work. Could you please export me web part properties of all those web parts? (there is an export link at the bottom of each web part)

Best regards,
Jan Hermann

User avatar
Member
Member
lawrence.dine-moov2 - 5/25/2012 6:28:43 AM
   
RE:Lists using DocumentDataSource and BasicRepeater
Ok, at this point I've taken everything off the list page except the DocumentsDataSource and the BasicRepeater just to see if I can get it to display anything other than just the document itself.

I was going to post the export content here but whenever I click Export Settings it the properties pane just goes blank. What is supposed to happen when I click that?

User avatar
Kentico Support
Kentico Support
kentico_janh - 5/25/2012 10:52:11 AM
   
RE:Lists using DocumentDataSource and BasicRepeater
Hello,

The export link title is "Export web part properties" and it should offer you a standard download modal window to download the *.txt file and it should work as well. Have you apply any hotfix to your version of Kentico? Anyway, you can write here all filled properties without that functionality, but it takes more of your time.

Best regards,
Jan Hermann

User avatar
Member
Member
lawrence.dine-moov2 - 5/25/2012 11:01:33 AM
   
RE:Lists using DocumentDataSource and BasicRepeater
Well, obviously I'd rather not copy all of the properties out. I've tried the export with Chrome, Firefox and IE, it doesn't work on any of them. It just produces a blank page with yet another frame in it and a little bit of javascript.

I haven't applied any of the hotfixes because the Kentico hotfixes page specifically states "The hotfixes should be used only by customers that experience a major bug as the hotfixes do not represent a fully tested code." which frankly is more than a little worrying.

Is there a hotfix that makes this functionality work?

Which raises another point we've been wondering about, are there any patch notes available for the hotfixes?

User avatar
Kentico Support
Kentico Support
kentico_janh - 5/27/2012 2:31:31 PM
   
RE:Lists using DocumentDataSource and BasicRepeater
Hello,

The export functionality should work in a clear version of Kentico 6.0 as well, but the service pack 1 should also solve this problem, because if there was a change in some system file, then it rewrites it. If you are worried about applying hotfixes, then please apply hotfix 6.0.23 which was fully tested and it corresponds to the service pack 1 as you can read on this blog post.

Regarding to patch notes:

Hotfixes RSS

Best regards,
Jan Hermann

User avatar
Member
Member
lawrence.dine-moov2 - 5/28/2012 4:32:13 AM
   
RE:Lists using DocumentDataSource and BasicRepeater
Ok, I had the version from the site that came with SP1 preinstalled but I've applied all hotfixes up to the latest version anyway, still no dice on that properties export. It works on another developer's machine here and on our staging server but not on my local machine. I don't think anything that I've done should have broken that functionality, all I've done is clone a web part and make a custom module, everything else was within the CMS.

So I decided to export all the settings as a series of screengrabs instead:

Documents Data Source:

User image

User image

Basic Repeater:

User image

User image

User image

Thanks for the link to the patch notes.

User avatar
Member
Member
lawrence.dine-moov2 - 5/28/2012 5:33:22 AM
   
RE:Lists using DocumentDataSource and BasicRepeater
Also I'd like to add that if I change the document type to something other than BasicPage then use this template it works.

User avatar
Kentico Support
Kentico Support
kentico_janh - 5/30/2012 5:19:11 AM
   
RE:Lists using DocumentDataSource and BasicRepeater
Hello,

Settings look right and when I have set the same properties as you have, proper custom documents show up...

Only thing which bothers me is that grey UNKNOWN_TYPE text in each text field. Can you see this text in all web parts on every template?

Best regards,
Jan Hermann

User avatar
Member
Member
lawrence.dine-moov2 - 5/30/2012 7:20:57 AM
   
RE:Lists using DocumentDataSource and BasicRepeater
The UNKNOWN_TYPE placeholder text is just something chrome is doing, it won't make a difference to Kentico.

That's odd, you still see the correct documents even when you have the same custom document type at all levels of the tree? Just the one type for all nodes?

User avatar
Kentico Support
Kentico Support
kentico_janh - 5/31/2012 5:40:27 AM
   
RE:Lists using DocumentDataSource and BasicRepeater
Hello,

Yes, exactly. I have following tree structure and all documents in it are my custom document type:

User image

I have filled properties of those mentioned web parts as you can see below (only change is that I fill it with relative path to see want it shows on lower levels of document structure):

Webpart properties (Documents data source)

Alias path: /test/1
Zone ID: zoneLeft


Default


Web part control ID: DocumentsDataSource

Web part title:

Disable view state: False

Disable macros: False


Content


Path: ./%


Content filter


Document types: custom.asdf

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 duplicates: False

Enable selected item: False

Filter name:


System settings


Check permissions: False

Cache item name:

Cache minutes:

Cache dependencies: ##DEFAULT##




Webpart properties (Basic repeater)

Alias path: /test/1
Zone ID: zoneLeft


Default


Web part control ID: BasicRepeater

Web part title:

Disable view state: False

Disable macros: False


Visibility


Visible: True

Hide on subpages: False

Show for document types:

Display to roles:


Content


Data source name: DocumentsDataSource


Transformations


Transformation name: custom.asdf.Default

Alternating transformation name:

Item separator transformation name:

Header transformation name:

Footer transformation name:

Selected item transformation:

Selected item header transformation:

Selected item footer transformation:


No data behavior


Hide if no record found: True

No record found text: No data found


Web part container


Web part container:

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##




Now if I navigate to the page 1, appropriate documents show up:

User image

Picture below displays what I see on the 12 page:

User image

Are your documents published?

Best regards,
Jan Hermann