3217 Posts in 853 Topics by 812 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 964 Views |
-
I don't get it - two different types

24 July 2009 at 3:24am
Hi,
Ok I'm very new to SS, and I'm trying to pull ou site together. Now I have this issue I I just cannot seem to understand what I need to do.
So I have a page call 'Pricing' (I created a pricing.php and .ss)
Within this page I have two different types of content that we want to display.ie layout somewhat like
<start page>
PricingContent1, Content1,Content1, Content1
Content2, Content2
<end page>I've created a php and layout ss for each of these types, so that in the admin area we can create page for each one to populate that content.
I have got as far as Content1 but when I try and display content2 I don't know how to get these pages.
For Content1 I'm doing:
<% control Children %>
<% if LessThanFive %>
<% include ContentBox %>
<% end_if %>
<% end_control %>However I don't know how to display the other type. I've tried doing this:
<% control getContentBoxLargeHorz %>
<% include ContentBoxLargeHorz %>
<% end_control %>class Pricing_Controller extends Page_Controller {
function getContentBoxLargeHorz() {
$here = DataObject::get_one("Pricing");
return ($news) ? DataObject::get("ContentBoxLargeHorz", "$here->ID") : false;
}}
But this doesn't work.
How do I do this sort of thing?
Many thanks
Wayne -
Re: I don't get it - two different types

27 July 2009 at 6:44pm
ah figured it out. I had a silly typo - seruprising what a weekend can do for having a fresh view at something
should of been:
function getContentBoxLargeHorz() {
$here = DataObject::get_one("Pricing");
return ($here) ? DataObject::get("ContentBoxLargeHorz", "") : false;
}
| 964 Views | ||
|
Page:
1
|
Go to Top |

