Forum
How to link multiple sections with single setup page.
Hi,
I have been working for a website & stuck with an implementation that how can I setup latest news sections (just top 5 headlines with some content) on home page and another webpage 'News' where all the news headline with the complete content is displayed.
So the question here is; how can I have the setup done for 'News' webpage so that it displays all the content in the same page but show only top 5 headlines from these news on the home page.
Sooner reply would be appreciated. Thanks!
Hi Damian, this is quite easy to do.
Firstly, set up your news page, e.g.
news/index.php
, to contain something like:The above uses the
article.html
template that already exists inperch/templates/content
, with the addition of aslug
for linking to the full article, but you can use your own if you like. Here it is with the `slug added:Your
_news_listing.html
(to be saved inperch/templates/content/) template would contain any elements of
article.html` you'd like to show in the listing, in list form. For example, just the headline:On the website home page, add this code to show the latest 5 News links:
What you are describing is a list detail page, there is an example in the documentation https://docs.grabaperch.com/perch/content/functions/how-do-i-create-list-detail-pages/
you have any video for this :( ??
No - are you having problems following the instructions? Where are you stuck?