Hardcode a custom render view

Permalink 1 user found helpful
The client wants a blog block in the footer of every page. I got it to work by hard coding it no problem, but then I needed to use a custom view to meet their design needs, so I created a view.php and view.css in /blocks/rss_displayer/templates/bullet_date/ but by using the following code below, it won't render with my custom view.

<?php
$rd = BlockType::getByHandle('rss_displayer');
$rd->controller->itemsToDisplay = '2';
$rd->controller->url = 'http://blog.alfredapp.com/feed/'; //just using this URL for testing purposes
$rd->render('bullet_date');?>
?>


I've tried a million different things in the $rd->render part, but it either just shows the default view or gives me a file not found error.

Just for fun, I created a rss_displayer block the "old fashioned" way and when I went to use a custom template, my "Bullet Date" template was in the drop down and displayed like I wanted.
CWSpear
View Replies:
SVijay replied on at Permalink Reply
SVijay
Hi,

If you want a blog block in the footer of every page, follow the below given points

1. Log in as admin of your concrete5 installation.
2. Open ‘Dashboard’.
3. Go to Pages and themes --> Page Types section.
4. Click on ‘Defaults’ button of the necessary page type.
5. Concrete5 will redirect you to the page where you can get into editing mode and add blocks in the footer area, that you want to be created on the page type of every page by default.
6. You can also set default permissions the same way.
7. Once you exit editing mode and click ‘Publish changes’, default settings will be applied and every time you create a new page with that page type, it will have pre-defined set of blocks and permissions.