Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

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

Forums Help & Support showing category previews on same page as main feed
Alankeys
Posted on 23 May 2010, 16:46:37

Access: Member
Total Posts: 107
Joined: 2009-11-28



Ive been calling previews of categories on home page using..


<?#php
$template = 'small_headlines';
$nppage = '1';
$cat[] = 'Company Reports';
include './news/index.php';
?>




In all I have my main feed and then review four categories. Trouble is, it means that the XML code is reproduced five times within the page source code.


Is there a better way of doing it ?
#2313
Chris
Posted on 23 May 2010, 16:49:04

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

I'm not entirely sure I follow. You have 5 different includes on the same page?
#2315
Alankeys
Posted on 23 May 2010, 17:07:02

Access: Member
Total Posts: 107
Joined: 2009-11-28

thats right Chris
I could not see how else to make previews of the last story in each category on the home page...
#2323
Chris
Posted on 23 May 2010, 17:13:32

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

Multiple includes is currently the only way to achieve this. In the future perhaps a new method will be added, special categories maybe, you "build" these categories by selecting which posts from which categories you want to display. Would be quite difficult to implement so I'll see what I can do.
#2325
Alankeys
Posted on 23 May 2010, 17:17:09

Access: Member
Total Posts: 107
Joined: 2009-11-28

ok.

well, for the thread, I would point out that there is one alternative that keeps the code off the page.

Use an IFRAME for the category previews although still not a best solution it should tidy up source code of the main or home page.
#2326
Alankeys
Posted on 29 Jun 2010, 16:26:07

Access: Member
Total Posts: 107
Joined: 2009-11-28

Chris

A lot of users are going to want to have a list of new headlines on their homepages.

They may also wish to preview the top story.
Im my case, I like to preview the categories in similar way to the http://www.sharecast.com/ homepage.


Can you advise the best approach for this. Im aware of a few ways to go and IFRAME or div wrappers could be used but I dont think they are ideal solutions.
#2583
Network-13.com © 2013