Jump to:

3445 Posts in 1031 Topics by 872 members

Template Questions

SilverStripe Forums » Template Questions » Remove default template on 'view'

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

Page: 1
Go to End
Author Topic: 397 Views
  • stellalie
    Avatar
    Community Member
    10 Posts

    Remove default template on 'view' Link to this post

    Hi,

    Sorry if this is a noob question. Been looking all around but haven;t find a clue. Basically I would like to use a view based on existing page as a pop-up.

    specialpage_controller extends page_controller {

       static $allowed_actions = array (
          'view',
          'popup'
       );
    }

    /popup is displayed using specialpage_popup.ss, which includes the default header and footer for that template.

    How do I remove that?

    Many thanks in advance.

  • MarcusDalgren
    Avatar
    Community Member
    288 Posts

    Re: Remove default template on 'view' Link to this post

    You can just put specialpage_popup.ss in the root of the templates folder instead of the Layout folder. Otherwise you'll have to use renderWith in order for it to render just the sub template and not the whole thing.

  • stellalie
    Avatar
    Community Member
    10 Posts

    Re: Remove default template on 'view' Link to this post

    This is the right thread!

    Ah!! I never knew this going to be so easy.

    Thank you!! Placing specialpage_popup.css on root template folder do the tricks.

    397 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.