Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Injecting content View modes: 
User avatar
Member
Member
Armysniper89 - 7/11/2011 10:59:42 AM
   
Injecting content
I have a carousel on my home page that is automatically setup to display content within a div that looks like this:


<div class="inner">
<div class="item">
<h2>Advocate editorial: “Understanding the World”</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. <a href="#">Learn more</a></p>
</div>

<div class="item">
<h2>Quisque scelerisque lectus non diam sollicitudin nec</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. <a href="#">Learn more </a></p>
</div>

<div class="item">
<h2>Class aptent taciti sociosqu ad litora torquent per conubia nostr</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. <a href="#">Learn more </a></p>
</div>

<div class="item">
<h2>Morbi sed libero felis. Nullam iaculis tincidunt imperdiet.</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. <a href="#">Learn more </a></p>
</div>
</div>


Each div with the class "item" is a carousel item. I would love to inject content into the page using a document list instead of manually adding this HTML in a Static HTML Web Part. Each H2 and <p> tag will be a field in a document under the page that is displaying the carousel. I already have the carousel itself setup to display whatever is shown in between the "inner" div class...but I am trying to figure out how to do this with web parts. Is this possible?

User avatar
Member
Member
Armysniper89 - 7/11/2011 11:33:26 AM
   
RE:Injecting content
Well I found out after looking around a second time in the forums this post: http://devnet.kentico.com/Forums.aspx?forumid=45&threadid=19130

This helped out alot. I had approached it this way originally but was confused when I saw 4 repeater items show up. I just simply had to limit it to 4 items in the Content Filter and it worked. Yay! I answered it myself! ;)

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 7/13/2011 6:27:30 AM
   
RE:Injecting content
Hi,

Glad to see you've found the solution for your aim.
It's generally all about an appropriate transformation in a Repeater or Datalist and the right settings.
For you aim, you may also use scrolling text web part, anyway, the repeater is always a good way to go.

Regards,
Zdenek