Jump to content

disall2000

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by disall2000

  1. I'm very new to both Processwire and PHP so bare with me. Now I've set up everything in the different Fields, Pages and Templates. In one of the templates I have created a Repeater Field containing one Field that is a Page Reference and another Field that is a Text Field.

    Now I've tried both

    foreach ($page->template->fieldgroup as $f) {
        echo $f->name . "<br>";
    }

    and

    <?php echo $page->get("myfieldgroup"); ?>

    Here I get the ID's from the Page Reference but nothing from the Text Field. The first example gave me nothing at all.
    So how do fetch these results?

  2. Can't get it to work. What am I doing wrong?

    <ul><?php
    foreach($page->children as $child)
       echo "<li>" . " {$child->title} " . " 
       
    foreach($page->children as $child)
       echo "{$child->title} <img src='{$child->images->first->url}'>" . "</li>";
       
       ?>
       </ul>		

     

  3. How does the image field work? I've been trying to understand the tutorials but it just ties my head in knots. I now very very very little php. What I'm trying to do here is just to output a simple page title and the image but the image don't show up at all.
    What am I missing here?

    <?php
    foreach($page->children as $child)
       echo "{$child->title}{$child->$image->image}" 
        ;?>

     

  4. How do I get the output of a field that is a FieldTypePage?

    I've tried

    echo $page->first_name . " ";
    

    but it just prints numbers instead of picking data from that page it's referencing to. Couldn't find any info on how to use this module/field either.

  5. I'm in need of changing the charset for my site but I couldn't find any way of doing so since changing $config->dbCharset = 'utf8'; in wire/config.php gave me an error when I tried to install. I couldn't find anyway of changing charset during the installation configuration either. So how do I do it? I need it to be set to Swedish language so that I can sort letter like Å,Ä and Ö proper.

×
×
  • Create New...