Is there a way to add headlines to website? I want to do the short news feature but also want to include headlines on the page elsewhere too. Is this possible?
Access: Admin
Total Posts: 1395
Joined: 2006-05-19
Hey Corneliusw,
N-13 News was never really designed to allow multiple includes on different parts of the same page. Someone asked about this before, everything sort of revolves around the 1 index.php file which makes it difficult to deal with when trying to include multiple times. I'll certainly look into the possibility to display headlines in the next release, possibly by creating a separate file that can be included on it's own.
Ok thanks. I think a headlines feature is what every newsboard script wants because there are a lot of people who don't display short news or full articles on their website.
Hi I too found a way to get show headlines - it's a little bit round about but here goes:
Go to the Admin panel
1. Create a new template that only has the {title} in the news section site. - Title
2. Create a template that has the styles for displaying the long story. - Story
3. Select Story as your active template.
Edit pages
3. Create the page that's going to show your news headline e.g. news.php
4. Create a page that's going to show your news story news2.php
5. In your news.php add this code where you will show the news:
<?php $template = 'Title';
$cat = 'all';
include 'path/to/news/index.php'; #example 'news/index.php';
?>
6.In your news2.php add this code where you will show the news:
And that's it. News.php will show the headlines using the Title template. The headlines link takes you to News2.php which uses the Story template.
N.B. i did say that you need to select the second template as the current. This is not the case since you state it explicitly in the code on the page. You can do this for any template