Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Hierarchical tranformation and Hierarchical viewer View modes: 
User avatar
Member
Member
pavel.1991-tut - 4/15/2013 9:31:30 AM
   
Hierarchical tranformation and Hierarchical viewer
I found article http://blogs.jeroenfurst.nl/blog/may-2011/hierarchical-viewers-and-transformations
I've done all like in this article, but I have the next result:
there goes product links list, after this list there goes download links, then there goes faq list.

But I need the next structure:
product1 link
download link1
download link2
faq1

product2 link
download link1
download link2
faq1

But now I see this:
product1 link
product2 link

download link1
download link2
download link1
download link2

faq1
faq1

What do I do wrongly?

User avatar
Member
Member
pavel.1991-tut - 4/15/2013 10:13:09 AM
   
RE:Hierarchical tranformation and Hierarchical viewer
And one more question. Before in product transformation I used this code:

<%# DataItemIndex == 0 ? "<ul class='b-news__list'>" : "" %>
<li class="b-news__item">

But now when I use Hierarchical transformation, "DataItemIndex" returns wrong value. It returns value starting to count from first item from first transformation. How can I fix it?

User avatar
Member
Member
pavel.1991-tut - 4/17/2013 6:25:03 AM
   
RE:Hierarchical tranformation and Hierarchical viewer
pavel.1991-tut wrote: And one more question. Before in product transformation I used this code:
<%# DataItemIndex == 0 ? "<ul class='b-news__list'>" : "" %>
<li class="b-news__item">

But now when I use Hierarchical transformation, "DataItemIndex" returns wrong value. It returns value starting to count from first item from first transformation. How can I fix it?

What do I do to have right item index?

User avatar
Member
Member
pavel.1991-tut - 4/16/2013 5:35:46 AM
   
RE:Hierarchical tranformation and Hierarchical viewer
Does anybody know?

User avatar
Member
Member
pavel.1991-tut - 4/16/2013 10:32:44 AM
   
RE:Hierarchical tranformation and Hierarchical viewer
I'm sorry, I was wrong about first question. But second question is still actual. Help me, please.

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 4/24/2013 1:51:42 AM
   
RE:Hierarchical tranformation and Hierarchical viewer
Hi,

I'm afraid that getting the DataItemIndex relative to the specific document type (classname) will be more difficult task, as it's counted globally over all items.

What I see in the condition is generally the leading element of the unordered list... couldn't this be done with the First item transformation for the specific document type?

Regards,
Zdenek