Hi,

I've spent the last week searching for some good "phpframework".
Finally I dropped by cakephp.org and within 2 hours I did the blog
tutorial. Every thing seems clear.

Now I have a question regarding including blocks that contains dynamic
data into my default.thtml.

Here's what I've done.

I've created an element in views/elements/ called latestnews.php

<div class="block newsblock" id="newsblock">
        <h2>Latest News</h2>
        <div class="content">
                <ul>
                        <?php foreach ($news as $newsitem): ?>
                                <li><?php echo 
$html->link($newsitem['News']['title'],
"/news/view/".$newsitem['News']['id']);?></li>
                        <?php endforeach; ?>
                </ul>
        </div>
</div>

did not seem to work.
the question is:
Do I need to create a model and controller for each element? or I can
just use a controller previously made for a page view?
Is there a place where I can see a more advanced example than the blog
tutorial?

Your reaply is highly appreciated
Raffi Hovhannesian
http://www.hovhannesian.com


--~--~---------~--~----~------------~-------~--~----~
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