Jump to content

Small Project Walkthrough (Planets)


ryan

Recommended Posts

Ryan

I was just thinking that it would be great if this was carried on in some way. I think the main advantage of having a whole site tutorial is that so many different methods come up that we all face in our projects:

How you organise your templates

How you go about changing permissions so that the end-user only edits what is needed

Field types

Navigation

I think when it's all part of a project then it's easier to grasp and people will come out the other end of it with a much better idea on how to do their own projects.

I know time must be very short and if there's any way I can help out, I'd be delighted.

I also must stress that on a general level, the documentation here is outstanding, I just think an all-inclusive project walkthrough would be the icing ;)

  • Like 2
Link to comment
Share on other sites

ProcessWire is meant to support your existing way of developing things, but I think it's always good to provide a starting path and then let people take it from there. More needs to be added, like you mentioned. We added the tutorials board here a few months ago and hoping to continue adding to it with more stuff like this. I also want to start adding new site profiles. I plan to expand on this tutorial with the items mentioned at the bottom of it (page 1), as soon as time allows. Anyone that wants to make tutorials or site profiles, that's great too and just let me know what I can do to assist.

  • Like 1
Link to comment
Share on other sites

I'd love to help out but think it's pretty early days for me so far!

I feel that it may actually be the 'back-end' where most of the head-scratching goes on (that could just be me though).

We're lucky that the community and yourself back this product so much that the answers are nearly always out there.

Link to comment
Share on other sites

  • 4 months later...
  • 1 month later...

This is my first post on PW forum. I'd like to say Hi to everyone and express my thanks to Ryan and Crew for givining us this amazing tool. I've been looking for CMS of such kind for some time now without satisfactory results but after discovering PW few days ago I'm content. Thanks again!

Oh, and I'm looking forward to see some new tutorials :)

Cheers!

  • Like 3
Link to comment
Share on other sites

As a matter of fact I'm developing a project for a client and when I found PW I decided to switch to it - that means I must start some work from the beginning (but I'm sure it's worth the time for future benefits). The basic PW knowledge I found on PW website and forum is what I need right now so I don't have any suggestions about new tutorials at the moment. Questions may appear along the way though.

Thanks for asking anyway. Regards.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

One more basic question about Repeater...

I have this code which is working fine for a single text field (called "medic").

<form>
<?php
 $choice = $pages->find('template=clinics');

 foreach($choice as $ch)		
 echo "<label>$ch->title</label>	
 <select>
	 <option></option>
	 <option>$ch->medic</option>
 </select>";		
?>
</form>

Now I need to put the single field into the Repeater (to be able to add some more in future) called for example "med" and I have a problem doing so. It seemed easy but I tried few options and they didn't work. The obiouse was to change

<option>$ch->medic</option>

to

<option>$ch->med->medic</option>

but it doen't work of course. How to use the existing loop to manage the output of Repeater fileds? Should I add one more loop inside the existing one just for the Repeater?

Link to comment
Share on other sites

It is a repater indeed and I know that I need to use a loop to render the output. The problem is that I have already one loop in the code (it outputs the form markup). I tried to put another one especially for the repeater (as sibling to the existing loop or as a child of it) but it doesn't make sens. I also put the repeater loop in function and then called it from inside the original loop with no results.

It's simple issue but confusing for me.

Anyone?

Should I start a new forum topic?

Link to comment
Share on other sites

You have to put it inside, not as a sibling.

<form>
<?php
$choice = $pages->find('template=clinics');

foreach($choice as $ch){	
   echo "<label>{$ch->title}</label>		
   <select>
       <option></option>";
       foreach($ch->med as $med) echo "<option>{$med->medic}</option>";
       echo "</select>";
   }	
?>
</form>
Link to comment
Share on other sites

I think it's better to start a new topic, as it doesn't belong here.

Also, I think I'm more confused than you, as I don't understand what you want and what exactly your setup is. So please try to give all the infos needed. Maybe a screen of you edit page screen and your code will help understand.

Thanks

Link to comment
Share on other sites


<form>
<?php
    $choice = $pages->find('template=clinics');

    foreach($choice as $ch) {
        echo "<label>$ch->title</label>";
        echo "<select>";
           echo "<option></option>";
           foreach ($ch->med as $med) {
            // $med will have your single repeater, so something like this:
            echo "<option>$med->medic</option>"; // or $med->title or whatever fields your repeater has
           }
        echo "</select>";
    }    
?>
</form>
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 months later...

Welcome to the forum asosking. Can you post the piece of code that is giving you trouble? Since your question is so vague, we can't even know how much PHP you know, so I will assume it's not much. Can you tell us the result of doing this instead of page->title, to see if your php is working?

<h1><?php echo "php is working" ?></h1>
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...