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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Template Questions /

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

Remove default template on 'view'


Go to End


3 Posts   1051 Views

Avatar
stellalie

Community Member, 10 Posts

4 October 2011 at 10:57pm

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.

Avatar
MarcusDalgren

Community Member, 288 Posts

4 October 2011 at 11:03pm

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.

Avatar
stellalie

Community Member, 10 Posts

5 October 2011 at 1:28am

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.