0
votes

I have a single page with a form (located in application/single_pages/my_single_page), what I want to do is very simple, on submission I want to send an email. So far I can show the single page and the form. Then I put the controller in application/controllers/controller.php but this didn't work. So then I added application/controllers/single_page/controller.php and neither then some other combinations, but it seems it is not the right way to do it. I can't find much information online, any help???

1
Hi @MicheleLocati, i did, and at the end ended up doing the single page in the package, but im having some problems rendering the page, basically doesn't show anything... still working on it - Ale Van Houtte
For speed reasons, concrete5 caches many things: you should try to clear the concrete5 cache when you see something strange. - Michele Locati
yeah, disabled all cache and using incognito mode just to be sure :P good thing is that is working, so good stuff :D thanks for the help @MicheleLocati - Ale Van Houtte
@Ale Van Houtte: Did you find a solution or are there still any problems? - 1stthomas

1 Answers

1
votes

Assuming your page lays under the root page and has the name my_single_page the single_page needs to be placed on application/single_pages/my_single_page as you noticed. Then you need a controller under application/controllers/single_page with the filename: my_single_page (which looks like: application/controllers/single_page\my_single_page.php). This controller needs the following base structure:

<?php
namespace Application\Controller\SinglePage;

use PageController;

class MySinglePage extends PageController
{
    // Your code
}

This should do the trick.