HI, I'm using cake v1.2

  My question relates to content_for_layout (I think), and for the
past hour I've been reading the results of a group search for this
search term, but couldn't find an answer.

 My views are more or less PHP code that iterates through the results
of an amazon product lookup.  And really, the code is the same, except
for the very small that changes from view to view... and that is the
amazon searchindex such as 'books', 'dvd', etc..

So I took out the generic php look-up and "looping" code and put that
it in a file called generic.php.  (I don't know where to put that).
And now, each of my views is stripped down to just:

== books/index.thtml==
$searchindex = 'Books'
$display_string = "best selling books";

==dvds/index.thtml==
$searchindex = 'dvds'
$display_string = "best selling DVD's";


However, I have no clue on how to get that generic.php "included".

I tried the obvious thing, i.e., in each view, just put "include
'generic.php', below the top two php assignments  but of course I
didn't expect that to work, because of the way that cakephp is built
-- it makes you use its own keywords.

Is there an easy way of doing this. Should I be editing the layout/
default.thml file?

Thanks for reading this,
Steve


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to