what version of SS are you using?  Your setup should work.  What do
you place between <% control Projects %> AND <% end_control %> - I
mean, how do you know it is not working? Is it placed in the right
area?

Firstly, add the following function to your HomePage class:

function Projects() {
 return "hello world";
}

in your template, replace the <% control Projects %>..<% end_control
%> section with $Projects....

You should see hello world appear on your site now.

Next, undo the changes to your tempalte (go back to <% control
Projects %>...<% end_control %>)

Then, add the following function to your HomePage class:

function Projects() {
 return DataObject::get("Project", "HomePageListing = ".$this->ID);
}

If that does not work then there is an issue with your data.

If it does give results now, then come back and ask again.

Cheers

nicolaas


-- 
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to