Welcome to Geeklog, Anonymous Monday, December 05 2022 @ 07:00 pm EST

Geeklog Forums

Limiting stories on home but not rest of site


Status: offline

adydas

Forum User
Junior
Registered: 02/26/04
Posts: 33
Is there any way to only display the featured article on the home page and then have like 10 articles per page on the subsequent pages.

I limited the stories to 1, but on the subsequent pages only one article will show.


If you go to my site then click on articles in the top meny you will see what im trying to do.
http://www.lawresearchgroup.com/index.php
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
first--when you create a topic you have the ability to assign a number of stories per page for that topic.

second--when you submit articles under those topics, you have the option to display on the front page or not--choose not, except for the featured article of course.

leave the "stories per page" setting in config.php as default. All done.
 Quote

Status: offline

RickW

Forum User
Full Member
Registered: 01/28/04
Posts: 240
Location:United States
I had to do something similar, but what I ended up doing is adding additional template files so my topic pages looked different from the home page.
www.antisource.com
 Quote

Status: offline

adydas

Forum User
Junior
Registered: 02/26/04
Posts: 33
Well this still doesn't really help because i am using the second page of the index to display all my articles.

http://www.lawresearchgroup.com/index.php?page=2

I would have to dump all the articles into on category for this to work and change my link to the acticles section. Any more ideas?

 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
yes you're right... I see what you're doing now and gl isn't setup to do that naturally so you'll have to add an if/else statement to check whether page=1 or not. off the top of my head (around line 205ish in index.php):
Text Formatted Code
    // get reamaining stories
    if ($page != 1){//added this line
        while ( $A = DB_fetchArray($result) ) {
            $display .= STORY_renderArticle ($A, 'y');
        }
    }//added this line


 
no guarantees
 Quote

Status: offline

RickW

Forum User
Full Member
Registered: 01/28/04
Posts: 240
Location:United States

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
my previous post does what you want, sortof, but after testing it I realize that the page nav will cause a problem. so it is an answer, though an incomplete one.
 Quote

All times are EST. The time is now 07:00 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content