Search the Community
Showing results for tags 'howto'.
-
Hy, I cannot get it going. I try to update a repeater field, containing username, email, a int value, a addresse and a description. I post the data to a handlerfile. So far so good. But how can I save the data to the field? The Pages is under home and contains a repeater_field named multi_locations -> this should be updated. My try so far: if ($input->post) { // $p = new Page(); // $p->of(false); // $p->parent = $pages->get(1); // $p->template = $pages->get('probleme'); var_dump($p); $melder = $sanitizer->text($input->post->melder); $email = $sanitizer->email($input->post->email); $location = $sanitizer->text($input->post->location); $urgency = $sanitizer->selectorValue($input->post->inlineRadioOptions); $description = $sanitizer->text($input->post->description); echo $melder . "| " . $email . "| " . $location . "| " . $urgency . "| " . $description; $p->multi_locations->title = "tryout"; $p->multi_locations->melder = $melder; $p->multi_locations->mailadresse = $email; $p->multi_locations->map->address = $location; $p->multi_locations->urgency = $urgency; $p->multi_locations->beschreibung = $description; //$p->save(); Please help me bring some light into the dark. Thank you in advance!
-
I want to give Twig a try for creating template pages. How do i start ? Use TemplateTwigReplace or TemplateEngineFactory (with TemplateEngineTwig) ? My main concern is to be able to use the AOIM in my templates. Do I have to use TemplateDataProviders as well ? Any guidance is welcome. Thanks
-
Hey, I have a tournament page that requires teams competing in that tournament, this can be more then 2 it can be 100+ so I thought i get a page array but how do i use it in the template? i tried: foreach($page->teams as $team); { echo $team->title; } But then I'd only get the last team... how do i get this right?