Jump to:

7937 Posts in 1537 Topics by 944 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Extending ImageGalleryPage

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 810 Views
  • Mad_Clog
    Avatar
    Community Member
    78 Posts

    Extending ImageGalleryPage Link to this post

    Hi,

    I'm trying to extend ImageGalleryPage to make my own page type, basically just adding a couple of fields.
    Nothing fancy so far, the problem however seems to arise when I try to create a template specific to the newly created page type.
    For some reason it's not picking it up...

    mysite/code/SplashPage.php

    <?php
    class SplashPage extends ImageGalleryPage {
    }

    class SplashPage_Controller extends ImageGalleryPage_Controller {
       
    }
    ?>


    mysite/templates/Layout/SplashPage.ss

    <h1>blaat</h1>

    Did a /dev/build/ after adding above files, created a page with the newly created SplashPage type.
    However when i view the page it's using Page.ss for some reason...

    I also tried above code but then with extending Page instead of ImageGalleryPage and that did work as intended.
    So.... any thoughts?
    Appreciate it!

    - Geert

  • UncleCheese
    Avatar
    4085 Posts

    Re: Extending ImageGalleryPage Link to this post

    You need to create SplashPage_album.ss, too.

  • Mad_Clog
    Avatar
    Community Member
    78 Posts

    Re: Extending ImageGalleryPage Link to this post

    If you were a girl I'd kiss you ;)
    Cheers UC

    810 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.