A list of the newest articles of a section
The five newest articles of Fitness, always up to date.
Life cycle: Build, example 18 of 35. Worked out on the Fit & Healthy site of Exponential 6.0.15+.
Contents
In the Layouts editor
- Open Layouts > Layouts and the layout Landing Page / Home; the editor opens it in a draft.
- Open the block palette (+ at the top left) and drag List (group Listing) into the zone
main. - On the Content tab, Change the collection type to Dynamic collection, query type Exponential, Apply.
- Parent location: Fitness; Sort type Published, Sort direction Descending; under Offset & number of items the number 5.
- Publish layout. The pages that use the layout show the block on their next view.
Step by step with screenshots: Manual and dynamic collections.
With templates
- Write
extension/mysite/design/media/templates/explayouts/tpl_block/latest_fitness.tplin your design extension, clear the template cache, and place it with a Template block whose Template name islatest_fitness(Your own template blocks). The tested template is on that page.
Which to choose
Editors can retarget the dynamic list themselves; the template fixes it in code.
Check
- Publishing a new article in Fitness puts it first.
Related pages
- Manual and dynamic collections
- Your own template blocks
- Build examples, every page
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.