Nooku Guides

Create a View

Let's recreate (or not create as the case may be) the Items View as we did in the Front End version, but this time use a table to display the data. Just create the file


And add the following did before

            <th><?=translate('ID') ?></th>
            <th><?=translate('Title') ?></th>
            <th><?=translate('Description') ?></th>
      <? foreach($items as $item) : ?>
                    <?= $item->id?>
                    <a href="<?= route('view=item&id='. $item->id ) ?>">
                                <?= $item->title ?>
                    <?= $item->description?>
        <? endforeach; ?>

With the this template file in place and point the browser to

we still get an error "View: todos not found"

Don't get discouraged! All of this has a point!

The Framework is still trying to load the same "todos" view, because we haven't told it to do any different.