Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

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

Only show 6 records


Go to End
Reply

21 Posts   1137 Views

Avatar
alex123

1 February 2013 at 9:35pm Community Member, 18 Posts

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/

Avatar
IOTI

2 February 2013 at 2:39am Community Member, 189 Posts

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

Avatar
alex123

2 February 2013 at 2:53am Community Member, 18 Posts

Hi there,

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

Avatar
IOTI

2 February 2013 at 3:24am (Last edited: 2 February 2013 3:25am), Community Member, 189 Posts

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');

Avatar
alex123

2 February 2013 at 5:18am Community Member, 18 Posts

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
Avatar
alex123

2 February 2013 at 5:51am Community Member, 18 Posts

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

Avatar
IOTI

2 February 2013 at 5:59am (Last edited: 2 February 2013 6:17am), Community Member, 189 Posts

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?

Avatar
alex123

2 February 2013 at 6:06am Community Member, 18 Posts

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

Go to Top