Page Types within Packages and Wrapping

Permalink
I've built an extension in Concrete 5.6.x and make use of a page type within.

When rendering, this page type's content is wrapped with the theme's view.php in much the same way as a single page is.

Can anyone guide me as to why this is happening (as page types outside of a package don't have this occur) and how I can override this behaviour.

I've been trying to debug the core files to figure this out but am going somewhat around in circles.

Thanks in advance,

Dan

dbaggs
 
hutman replied on at Permalink Reply
hutman
If there is no matching file in the theme for a Page Type, it is wrapped in the view.php. So the only real way to get around this is to add a file in the theme with the same name as the Page Type and then add all of your code there.
dbaggs replied on at Permalink Reply
dbaggs
Hi Hutman,

Thanks for your response. So if I understand you correctly, you are saying that I need to add my page type template to the theme in order to avoid the wrapping?

I've just tried this out and indeed this works but is this not defeating the purpose of a package being an self encapsulated component?

Could you elaborate on why it is the case that package page types use the view.php?
hutman replied on at Permalink Reply
hutman
I can't really elaborate on why as I'm not part of the core team. But the idea is that a page type should still have the header/footer of the theme so that it looks the same as all pages as 99% of people would want it this way. What is it that you're building that you don't want it to match the rest of the site theme?
dbaggs replied on at Permalink Reply
dbaggs
You're absolutely right as I'm definitely in the 1% for this particular scenario, which is a bit of a hack. I've now found the reverse gear and found a more elegant solution.

Thanks again for your prompt help.