Home N-13 News Forums Help Search
RegisterForgot password?
I have the following error at the top of the page how to fix it Rayc
Email/url comment form help daisy1

Latest N-13 News 4.0.2

What is N-13 News?
Where can I get help?

Forums Suggestions Show news using article ID
aningbo
Posted on 17 Feb 2012, 11:37:31

Access: Member
Total Posts: 10
Joined: 2012-02-14

To show news article using specific article ID permanently from a category. This is done so as to have static pages like "about us" and use it like a mini CMS.

<?php $articleID = '23'; include 'news/index.php'; ?>

I know its possible by having different categories with just one article in it. But it becomes extremely messy if i have to have 50+ different static pages for which i have to create 50+ different categories with one article each. Not recommended if i have others handling the admin backend.

#3727
Chris
Posted on 17 Feb 2012, 07:15:50

Access: Admin
Total Posts: 1349
Joined: 2006-05-19

What you could do here is manually set the article ID parameter before your news include like so

<?php
define(ID, 6); // replace 6 with your article ID
include 'news/index.php';

I just tested this really quickly and it seems to work, though something might catch fire that I haven't thought about.

#3735
aningbo
Posted on 17 Feb 2012, 07:26:40

Access: Member
Total Posts: 10
Joined: 2012-02-14

u r awesome. i'll test it and let you know.

#3736
Network-13.com © 2011