Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > repeaters pointing at existing content View modes: 
User avatar
Member
Member
dcollins-marketwired - 2/11/2014 11:51:51 AM
   
repeaters pointing at existing content
I'm sure this is done all the time, but I'm not sure of how to build it.

I have an 'Company News' section that will contain any number of artciles added on an ongoing basis. The reader will be able to have a full page devoted to read an articleone. Those articles also have a smaller 'blurb' version gthat will display in a repeater on the 'Company News' landing page as well as the Homepage.

I guess I did this backwards, since I created the CN / HP repeaters first, and a custom document type to hold the article 'blurb' content. Now I'm trying to figure out where my pages go that hold the full articles.

So here's how it'll look to the reader:
HP:
repeater:
article-1 summary
article-2 summary
> More (links to CN page with ALL articles)

Company News
repeater:
article-1 summary
article-2 summary
article-3 summary
<paging>
Company News - Article 1
article-1 full

I'm OK with the repeaters, they work fine, but now I'm trying to figure out where the full article page goes with its dynamic content.

Is this how I build it?
HP
(stuff)
Company News
doctype: article, Article-1
doctype: article, Article-2
doctype: article, Article-3
Company News - Article (dynamically pulls content)

I guess I'm not sure what to do with that last bit.

User avatar
Member
Member
Shmar - 2/11/2014 12:20:12 PM
   
RE:repeaters pointing at existing content
you shoudl have on document type that has the following fields:

1) articel title
2) article 'blurb' content
3) article full content
4) any other fields you want.

On "'Company News' landing page" have a repeaer the goes thrwo all articles and uses a transformation teh only show:
article blurb + a link to full article.

On full article page have a transformation show all the info.

You can use the same template (and repeater) for both pages.
Just use "Transformation" and "Selected item transformation".

I suggest you install the kentico corporate site on you local and see examples for how to use all webparts and other functionality.

User avatar
Member
Member
dcollins-marketwired - 2/11/2014 12:37:32 PM
   
RE:repeaters pointing at existing content
Shmar wrote: You can use the same template (and repeater) for both pages.
Just use "Transformation" and "Selected item transformation".

This is the part I don't get.

And I'm terrified of messing with templates now, after twice blowing up my master page template and others. It is very murky what you're changing when you modify a template.

User avatar
Member
Member
Shmar - 2/11/2014 12:50:40 PM
   
RE:repeaters pointing at existing content
If you would like more in depth assistance feel free to contact us here:
http://4hilton.com/contact.aspx

User avatar
Member
Member
dcollins-marketwired - 2/11/2014 12:56:20 PM
   
RE:repeaters pointing at existing content
Shmar wrote: If you would like more in depth assistance feel free to contact us here:
This is spam. Why did you spam me?

User avatar
Certified Developer 10
Certified Developer 10
josha-bpstudios - 2/11/2014 3:33:57 PM
   
RE:repeaters pointing at existing content
The selected item transformation basically is when you click on the item. If you select an article, then you want for your selected item transformation to be the entire article, so the user can read the whole thing. Thats all the selected item transformation means. So on your first transformation, you can show a preview, and on your selected item, show the whole article.

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 2/11/2014 6:33:23 PM
   
RE:repeaters pointing at existing content
Josh is correct, there is no need to create a new template to display the "details" of a document type. Thats what the selected item transformation is for. By default it will inherit the parent page's template and content.

User avatar
Member
Member
dcollins-marketwired - 2/12/2014 9:42:04 AM
   
RE:repeaters pointing at existing content
FroggEye wrote: Josh is correct, there is no need to create a new template to display the "details" of a document type. Thats what the selected item transformation is for. By default it will inherit the parent page's template and content.

Ah. I see that property now. Thanks.

User avatar
Member
Member
ezelewsky-lbpc - 2/11/2014 6:06:13 PM
   
RE:repeaters pointing at existing content
A way to present articles that may work well for you is to build a template applied to the articles folder and inherited by all documents beneath. The template would have at least one repeater that calls an all-in-one transformation. Or you could have a repeater for each element (headline, photo, body text, etc.) and then a basic transformation for the particular items.

We've done it both ways, and it wound up being easier to manage the modular template with several repeaters because the transformations grew pretty big and hard to read when revisions were needed.

The trick with applying a template in this manner is to leave Content:Path: empty in the repeater. In addition, in the Site Manager-->Development-->Document types if you select the article type you're using, you can set the default page template applied to that document type. If you leave this field blank, then you'll have flexibility to apply templates based on the content tree (as opposed to content type). Choose what works best for your situation.

Here's one approach to the content tree, templates and documents --
yoursite.com (/root) --- MASTER template with header, placeholder for content, footer

/Home - templateHome inherits MASTER; repeaters show headlines and teasers

/Home/section1 -- templateSectionOne inherits MASTER; repeaters show items from a specific category

/Home/section2 -- templateSectionTwo inherits MASTER; repeaters show items from another category.

/Articles -- templateArticles; inherits MASTER; repeater(s) displays all documents in the article folder dynamically

An alternative structure would be to have an Articles folder under each section that might inherit specific content from the parent template. The webparts can be set to display on the parent template and all children that inherit from it, or a webpart can be set to display only on the one template. So you might have an image of a widget on templateSectionOne that should display on the widget articles, and an image of a wingbat on templateSectionTwo that should display on wingbat articles.

The Kentico templates can take a bit to figure out, but it's worth the effort once you do because they can be a time saver and improve site performance.

Good luck!

User avatar
Member
Member
dcollins-marketwired - 2/12/2014 3:50:33 PM
   
RE:repeaters pointing at existing content
OK, I seem to have everything working. (I was able to add a blurb-styled and a full-styled class to the containers of my repeater and my article, so I can style them differently).

Anyway, now I've got just one more wrinkle to introduce.

On my articles pages, I want to list the articles again, but this time off to the side (so not within the actual repeater webpart). Like this:

Articles in repeater, as usual:
User image

Selected article, but now the articles are listed very briefly in the right column:
User image

No idea how I might do that. Maybe this exceeds the limits of the usual repeater/selected functionality, and I've got to build my pages manually...

User avatar
Member
Member
dcollins-marketwired - 2/12/2014 3:59:47 PM
   
RE:repeaters pointing at existing content
To clarify: the tricky part is getting the sidebar to NOT appear on the Company News page, since it's already there.