Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Standard Repeater - just select articles from first child? View modes: 
User avatar
Member
Member
Darren - 3/26/2012 9:00:54 PM
   
Standard Repeater - just select articles from first child?
In my system I have a number of newsletters that are grouped by dates with Articles under them.

- Newsletter A (page)
- 10 Jan (page)
- Article A (article)
- Article B (article)
- Article C (article)
- 20 Jan (page)
- Article A (article)
- Article B (article)
- Article C (article)
- Newsletter B (page)
- 17 Jan (page)
- Article A (article)
- Article B (article)
- Article C (article)

The design of the Newsletter page is to take content and display the latest edition - so the first child page and related articles under it.

There are a number of repeaters - one to display the date - which is taken from the DocumentName of the latest edition with (ORDER BY nodeorder and select top 1 documents) the path for this is /Newsletters/Newsletter A/%.

However the article repeaters I currently need to change the path to match the latest article and the repeater needs to be updated each time - /Newsletters/Newsletter A/Current Edition/%

What I'm really after is /Newsletters/Newsletter A/<first child>/% so I don't need to

Is there a way to do this?

User avatar
Kentico Support
Kentico Support
kentico_janh - 3/27/2012 7:11:22 AM
   
RE:Standard Repeater - just select articles from first child?
Hello,

I think, that this can be done only through the custom macro:
Path: /Newsletters/Newsletter A/{% ProcessCustomMacro("first_child", "") %}/%

And the custom macro selects the alias of the first child document in the same way, as you display the date (ORDER BY nodeorder and select top 1 documents).

For more information about custom macros please follow the link below to our documentation:

http://devnet.kentico.com/docs/5_5r2/devguide/index.html?appendix_a___macro_expressions.htm

Best regards,
Jan Hermann