Thanks Levi.
I worked it out, so thanks a lot ;)

-Alister

On Thu, Jan 1, 2009 at 2:55 PM, Levi Stanley <l...@eneservices.com> wrote:

>  Not enough information was given.
>
> It isn't a scoping issue.  From your previous email,  you were accessing
> vanilla.nesting as if it was a public attribute in an object.  So if your
> object was done like this:
>
> class Vanilla extends IceCream implements ShoppingCartItem {
>     public $nesting = 'yui-gc';  // default setting;
>     ...
> }
>
> Then putting vanilla.nesting would work in nst's place in
> "in_array(vanilla.nesting, array('yui-gc','yui-ge'))".
>
> However, if your object is defined as:
>
> class Vanilla extends IceCream implements ShoppingCartItem {
>     ...
>     public function nesting(){
>        return 'yui-gc';
>     }
>     ...
> }
>
> Then you would have to refer to that function as vanilla.nesting().  I hope
> that answers your question.
>
> Best regards,
> Levi
>
> And have a happy new years.
>
> Alister Cameron wrote:
>
> Ok. I fixed it, but I'm not sure I understand "scope" here...
>  <tal:block define="global nst vanilla/nesting" />
> <div id="content" class="class" tal:attributes="class php: (in_array( nst,
> array('yui-gc', 'yui-ge'))) ? 'yui-u first' : 'yui-u'">
>
>  Can someone explain to me why the define is required?? Could this same
> outcome have been achieved within the php logic of the tal:attribute ??
>
>  Many thanks!
>
>  -Alister
>
>  ---
> Alister R Cameron
> CEO // Australis Media Pty Ltd
> http://www.australismedia.com
>
>  Mob. 04 0404 5555
> Fax 03 8610 0050
>
>  Click here to find me online:
> http://clicktoadd.me/alicam
>
> ------------------------------
> _______________________________________________
> PHPTAL mailing 
> listphp...@lists.motion-twin.comhttp://lists.motion-twin.com/mailman/listinfo/phptal
>
>
>
> _______________________________________________
> PHPTAL mailing list
> PHPTAL@lists.motion-twin.com
> http://lists.motion-twin.com/mailman/listinfo/phptal
>
>


-- 
Alister Cameron
Managing Director
Cameron Creative Pty Ltd
www.cameroncreative.com

Creative, Strategic, Innovative... never boring!
_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to