Jump to:

22970 Posts in 11572 Topics by 2823 members

General Questions

SilverStripe Forums » General Questions » Only show 6 records

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2 3
Go to End
Author Topic: 813 Views
  • alex123
    Avatar
    Community Member
    18 Posts

    Only show 6 records Link to this post

    Dear All,

    When I upgrade from 2.4.2 to 3.0.2. On the admin of news -> I add a lot of page but It only shows 6 records. I don't know why.

    http://www.neutrog.com.au/news/

  • IOTI
    Avatar
    Community Member
    187 Posts

    Re: Only show 6 records Link to this post

    Could you show us your php, and template code for this section? Without some details it makes it pretty much impossible to troubleshoot.

  • alex123
    Avatar
    Community Member
    18 Posts

    Re: Only show 6 records Link to this post

    Hi there,

    what the file name of template which you need I show to you.

  • IOTI
    Avatar
    Community Member
    187 Posts

    Re: Only show 6 records Link to this post

    I think it would be NewsPageHolder.ss

    By the way, it looks like you have dev mode enabled on your site. I would recommend you turn it off as it can present a security risk. If you are unsure of how to do this, you would add the following to your _config.php in the mysite/code folder.

    Director::set_environment_type('live');

  • alex123
    Avatar
    Community Member
    18 Posts

    Re: Only show 6 records Link to this post

    Thanks you reply.

    This is a page NewsPageHolder.ss which I rename NewsPageHolder.txt

    When I check my config file I don't see any line Director::set_environment_type('live');

    Do I add new line on config file.

    Thanks,

    Attached Files
  • alex123
    Avatar
    Community Member
    18 Posts

    Re: Only show 6 records Link to this post

    If I delete one file \framework\core\PaginatedList.php . I see this site is still work. I think I also problem with PaginatedList.php

    I find another solution It shows random page - Only limit 6 records. I check how can I change this value. But It doesn't work still now

  • IOTI
    Avatar
    Community Member
    187 Posts

    Re: Only show 6 records Link to this post

    Hey Alex,

    yes you would add the new line to _config.php for Director::set_environment_type('live');

    I'd like to make sure I am understanding the problem correctly. you said "I add a lot of page but It only shows 6 records". For the 6 records are you referring to the " Neutrog Fertiliser Explained", " Rocket Fuel Lands At Kitchen Garden Schools", "Graham Ross Honoured With Prestigious Award" etc items on the /news page?

    if you are, in your mysite/code folder is there a .php file called NewsPageHolder.php? If there is, can you check if there is a function that looks like

    function getArticles(){
    *bunch of code*
    }

    or

    function Articles(){
    *bunch of code*
    }

    If a function like that exists, could you copy/paste it here?

  • alex123
    Avatar
    Community Member
    18 Posts

    Re: Only show 6 records Link to this post

    I check on my ftp It doesn't show any file NewsPageHolder.php

    I also check with Edit Plus I don't see any function function Articles(). It means I need create NewspageHolder.php.

    If I create NewsPageHolder.php where I put this file on my site and how about information in this file

    813 Views
Page: 1 2 3
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.