clickpass

Members
  • Content count

    9
  • Joined

  • Last visited

Community Reputation

0 Neutral

About clickpass

  • Rank
    Newbie

Recent Profile Visitors

610 profile views
  1. clickpass

    I want to split my output of an image array, see my code here: <div class="row"> <?php foreach($page->umf_imgs as $image) {echo "<div class='one-fourth column refs'><img src='$image->url'></div>";} ?> </div> <div class="row"> <?php foreach($page->umf_imgs as $image) {echo "<div class='one-fourth column refs'><img src='$image->url'></div>";} ?> </div> <div class="row"> <?php foreach($page->umf_imgs as $image) {echo "<div class='one-fourth column refs'><img src='$image->url'></div>";} ?> </div> The number of images is 11, but I only want to add four in a row. Is it possible to grab them, e.g. image 1-4, image 5-8, image 9-12?
  2. clickpass

    I even think I posted the topic under the wrong category.
  3. clickpass

    Great, but I still don't know how to select my images. An example would be very helpful. To be honest, I have not the slightest idea how a modulus operator can do my task.
  4. I want to split my output of an image array, see my code here: <div class="row"> <?php foreach($page->umf_imgs as $image) {echo "<div class='one-fourth column refs'><img src='$image->url'></div>";} ?> </div> <div class="row"> <?php foreach($page->umf_imgs as $image) {echo "<div class='one-fourth column refs'><img src='$image->url'></div>";} ?> </div> <div class="row"> <?php foreach($page->umf_imgs as $image) {echo "<div class='one-fourth column refs'><img src='$image->url'></div>";} ?> </div> The number of images is 11, but I only want to add four in a row. Is it possible to grab them, e.g. image 1-4, image 5-8, image 9-12?
  5. Yes, BitPoet, I know it sounds puzzling. But your answer is as useful as simple. Thank you! I just had to add some names to my submits and get what I need now.
  6. The point seems to be that a copy of each page is saved under all siblings. They are copies, but why? When I say save a child page under "/comments/kommentare_zitat_1", how can there be 5 other copies under the siblings?
  7. Hi everyone! I have managed to build a little form where the entries are saved as a page. That works nice. My problem is that I need to use several forms for several diffrent questions, while the answer to each question is going to be listed below. For assorting the answers to their related questions I have made child pages for each question and gave them different related templates. The POST page should be saved under the parent, which is one child of the question siblings, and it should be given the particular template related to the child page. (It even worked fine one time before I made some changes). The problem is that the generated page from the form is then saved under all of the question siblings as a child. Where is the problem? I have six pages with six different templates. The templates all are holding the same fields. On submit a child page, basing on the template(s) is generated but unfortunately saved as a child under all of the six question pages. I want to save each answer as a child page of the related question page, but only there. What goes wrong? I am using Ryan's proposed snippet for such task, which I am greatly thankful for. Still in development and not much changed it looks like this: <?php // form was submitted so we process the form if($input->post->submit) { // create a new Page instance $p = new Page(); // set the template and parent (required) $p->template = $templates->get("kommentare_zitat_1"); $p->parent = $pages->get("/comments/kommentare_zitat_1/"); // populate the page's fields with sanitized data // the page will sanitize it's own data, but this way no assumptions are made $p->kommentar = $sanitizer->textarea($input->post->kommentar); $p->namez = $sanitizer->text($input->post->namez); $p->profession = $sanitizer->text($input->post->profession); // PW2 requires a unique name field for pages with the same parent // make the name unique by combining the current timestamp with title $p->name = $sanitizer->pageName(time() . $p->title); $p->save(); header("Refresh:0"); } else { // no form submitted, so render the form include("./comments-form.inc"); } ?> The template "kommentare_zitat_1" also exists as "kommentare_zitat_2" etc. The parent page "/comments/kommentare_zitat_1/" has siblings until "/coments/kommentare_zitat_6/". Now any time I am submitting an answer to one question/page, six pages are saved, each question sibling gets one. Might there be an easy solution? I don't know why this is not functioning anymore. Thx, Daniel
  8. clickpass

    Thank you, renobird, for the solving answer and your lead to the config module!
  9. Hello there, WireFolks! I am just about crashing into ProcessWire and try to make my way through. A Great CMS! What puzzles me right now is --why do the changes in my Reno Theme not apply? Any suggestions? Everything seems to be installed properly. Reno came along with my fresh 2.7.2 installation. I want to know, considering that there might be something about modules in general which I need to understand. Best regards Daniel