If I extend a Page Controller in a module, for example SilverShop/Page/CheckoutPageController , in the extension php file, i have
public function checkoutMethod(){
$this->owner->renderwith('CheckoutPage_checkoutMethod');
}
But where shall i put the CheckoutPaeg_checkoutMethod.ss file? If i put it themes/mythemes/templates/Layout/CheckoutPage_checkoutMethod.ss it can’t be found.
I also put it under
themes/mythemes/template/SilverShop/Page/Layout/ but no luck.
finally, i already follow the controller_action.ss naming convention, do i need to run the renderwith method, can i just do
I had a similar problem with this (with the Sitemap2 module), albeit just overriding the existing template.
In my case, the correct location was
themes/{MYTHEME}/TractorCow/Sitemap2/Layout
However, the thing that got me was that I copied the folder structure from the Vendor folder, which turned out to be slightly different to the Namespace used in the Sitemap2 files.
So:
themes/{MYTHEME}/Tractorcow/Sitemap2/Layout
didn’t work but:
themes/{MYTHEME}/TractorCow/Sitemap2/Layout
did.
Also, I assume it is a typo in the post but in your description you said CheckoutPaeg_checkoutMethod.ss which surely should be CheckoutPage_checkoutMethod.ss?
return array(), still works. The template goes into the same folder as your CheckoutPage.ss. i am not shure if this allready helps.
In which namespace is your app.
Eg CompanyPage => Namespace app
I have my page models in an folder that is called Pages
eg HomePage => Name HomepageModel
So my templates will be in themes/themename/templates/CompanyPage/Pages/Layout/HomePage.
From what i understood actualy you can overwrite the template with out an extension. Just look where the silvershop has its templates. eg if i wanted to overwrite a template from elemental
It would be:
themes/themename/DNADesign/Elemental/Layout/ElementHolder
if you want to use renderWith you have to combind it with customise()->renderWith() than it will be rendered with page.