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

How can I display the content and image of virtual page


3 Posts   742 Views


8 February 2010 at 8:23pm Community Member, 16 Posts


I am using BlogHolder page type to display list of inner BlogHolder and it's blogentry. I have applied different layout style for individual BlogHolder page type using their id. I did this using customised code in "/sapphire/core/control/ContentController.php". Now I got problem when I use virtual page, it doesn't display the content and image.

Please help, how can I display the content and image of virtual page.

As I know, Virtual page is link with "SiteTree" in db and Blog entry is link with "BlogEntry" in db.


8 February 2010 at 8:53pm Community Member, 712 Posts

arg... "Don't hack the core"

Extend BlogHolder with a new page type and customise it's controller instead.


17 February 2010 at 7:20pm (Last edited: 18 February 2010 3:47am), Community Member, 16 Posts

Yeh, thanks.

   I have extended the BlogHolder controller. As I require the page type for different layout. It looks like this :

   class NewPageName extends Page {
   class NewPageName_Controller extends Page_Controller {
      // My custom function

   I removed the custom code form core file.

   I have also found the solution for virtual page content.