21491 Posts in 5783 Topics by 2621 members
General Questions
SilverStripe Forums » General Questions » How can I display the content and image of virtual page
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 616 Views |
-
How can I display the content and image of virtual page

8 February 2010 at 8:23pm
Hi
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.
-
Re: How can I display the content and image of virtual page

8 February 2010 at 8:53pm
arg... "Don't hack the core"
Extend BlogHolder with a new page type and customise it's controller instead.
-
Re: How can I display the content and image of virtual page

17 February 2010 at 7:20pm Last edited: 18 February 2010 3:47am
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.
| 616 Views | ||
|
Page:
1
|
Go to Top |


