bernhard Posted September 30, 2024 Share Posted September 30, 2024 😎 4 1 Link to comment Share on other sites More sharing options...
Tiberium Posted September 30, 2024 Share Posted September 30, 2024 So funny, I was yesterday reading the RockFrontend Docs and planned a little project to test this out ^^ 1 Link to comment Share on other sites More sharing options...
Stefanowitsch Posted October 1, 2024 Share Posted October 1, 2024 A very good Video. This is a top feature of Rock Frontend for me! 1 Link to comment Share on other sites More sharing options...
zoeck Posted October 2, 2024 Share Posted October 2, 2024 Hello Bernhard, extremely nice feature! I need just such a function 🙂 I only noticed one small thing, in the documentation it says that it must be a PHP file in the AJAX directory, in the Rockfrontend Config it says the following: Quote To create a new endpoint simply add a LATTE or PHP file in /site/templates/ajax I also tried it with a .latte file and that didn't work. Is this function still missing or is this just a wrong text? Thank you for your great modules! 1 Link to comment Share on other sites More sharing options...
bernhard Posted October 2, 2024 Author Share Posted October 2, 2024 Hey @zoeck thx. I just tried and it seems to work. What exactly do you mean by "didn't work"? Steps to reproduce please. 1 Link to comment Share on other sites More sharing options...
zoeck Posted October 2, 2024 Share Posted October 2, 2024 45 minutes ago, bernhard said: What exactly do you mean by "didn't work"? Steps to reproduce please. Okay, that's weird… I tested it in my DDEV environment: Created the following Folder/files: templates/ajax/zeitbuchung/ajaxtest.php -> working templates/ajax/test.php -> working templates/ajax/test2.latte -> not working, Error 404 Content of the files is only "test" Checked the URLs in the Rockfrontend Config: Then testet the Endpoint /ajax/test2.l Working -> Endpoint: /var/www/html/site/templates/ajax/test2.latte /edit found the problem: // RockFrontend.module.php private function ajaxEndpoints(): array [..] // attach hook for every found endpoint [..] $url = $baseurl . substr($endpoint, strlen($folder), -4); The -4 is the problem 🙂 https://github.com/baumrock/RockFrontend/commit/064e37c0bfd4f9ae8377ae122e1b5426b18d52ee#diff-8223503ce304ec3ee54457dad412baf3a6f8701f67cd6fce3422de398e68907aR667 Link to comment Share on other sites More sharing options...
bernhard Posted October 2, 2024 Author Share Posted October 2, 2024 Hey @zoeck thx yeah that test2.l was helpful and I've fixed that in v3.21.2 1 Link to comment Share on other sites More sharing options...
zoeck Posted October 2, 2024 Share Posted October 2, 2024 Thanks Bernhard, now the Ajax endpoints also work with .latte as file extension. 🙂 👍 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now