Hardcode PageList with custom template?

Permalink 1 user found helpful
Should have asked an hour ago, but kept trying and failing with different things. Here's my code below. How can I get it to render with the custom template in pagelist/templates/top-navigation ???

<?php
                                       //Start
                                       $dPlst = BlockType::getByHandle('page_list');
                                       //Set Options
                                       $dPlst->controller->num = '2'; //Number of Pages in to display in block
                                       $dPlst->controller->selectCTID = '2'; //ID of page type (Value is found in Option List *** View Source in edit mode of block to see ***)
                                       $dPlst->controller->displayFeaturedOnly = '1'; //Options ('1', '0') 
                                       $dPlst->controller->displayAliases = '1'; //Options ('1', '0')
                                       $dPlst->controller->paginate = '0'; //Options ('1', '0')
                                       $dPlst->controller->cParentID = '151'; //Set for pages beneath a specific page if not set as 1
                                       $dPlst->controller->orderBy = 'display_asc'; //Options ('display_asc', 'chrono_desc', 'chrono_asc', 'alpha_asc', 'alpha_desc')
                                       $dPlst->controller->truncateSummaries = '1'; //Options ('1', '0')
                                       $dPlst->controller->truncateChars = '128'; //Number to be set if Summaries required as above
                                       //Render (Always Required!)
                                       $dPlst->render('templates/top_navigation');

View Replies: