Tip: How to add Page List with Custom Template in your Pagetype
This goes into your custom Pagetype file in your theme. And also, this is for when you have your own custom template for Page List block in /concrete5/blocks/page_list/templates.
<?php $pl_block = BlockType::getByHandle('page_list'); $pl_block->controller->num = 5; // how many page items to list $pl_block->controller->cParentID = '165'; // page ID of parent $pl_block->render('templates/mytemplate'); ?>
I am using the easy news add on and I am trying to create a template for for the easy news list block or page list block to:
1) style the title/heading link, preview text, background ect
2) add a Read more... link to the bottom of the news article preview
Any ideas I'm very stuck?
But for your situation, I assume you want to have:
- a top News page, which lists all the news
- actual news article pages, all go under News
Here's how I would do it without the Add-On.
I'd create a page called News, and then all the news articles go under that page. And when I want to list out all the news, I would just use the Page List block.
You can customize the look and feel of the Page List block by choosing a different custom template. You see that option when you click on the Page List block.
If you know PHP, you can also create your own template for the Page List. Just look into /concrete/blocks/page_list/templates use one of the files, copy it and renaming it to something else, mynews_list.php for example. When it's there, next time you click on a Page List block, and then the Custom Templates, you will see the option to choose your new template.
I hope this helps.
I will follow your instructions and see how it goes.