Jump to:

1384 Posts in 493 Topics by 522 members

Themes

SilverStripe Forums » Themes » Remove default template on 'view'

Discuss SilverStripe Themes.

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

Page: 1
Go to End
Author Topic: 527 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.

  • martimiz
    Avatar
    Forum Moderator
    1086 Posts

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

    Are you saying that the specialpage_popup.ss template itself actually includes the page header and footer? In that case removing them from the file and doing a /?flush=1 should do the trick.

    Or do you mean they are not in the template but for some obscure reason SilverStripe still includes them when generating the popup? In that case: are you sure the specialpage_popup.ss is actually used? If so then post your specialpage_popup.ss template and of the bit of code in your popup() function where you generate the output...

  • stellalie
    Avatar
    Community Member
    10 Posts

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

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

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

  • martimiz
    Avatar
    Forum Moderator
    1086 Posts

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

    Thanking the wrong thread... Should go to Smurkas answering your same question(!) in another thread:

    http://www.silverstripe.org/template-questions/show/18202

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