Next 4.2 Creating templates Prev

Creating templates

Let's define 3 published pages for our main Center component:
Template page namePublished page name
generic.htmlindex.html
best_products.txtfeed/best_products.txt
best_articles.txtfeed/best_articles.txt

generic.html is a standard template; other two short templates may look like this:

best_products.txt - feed data of 10 chosen products:

<{
    products get_first(10) ({<{name}>|<{title}>|<{price}>|<{sale_price}>})
}>

best_articles.txt - feed data of chosen articles:

<{
    articles get_all ({<{date_created &format_date}>|<{name}>|<{title &remove_breaks}>})
}>

Next Content Management with Podius Prev