Guestbook

Permalink 2 users found helpful
Hi,

Is it possible to edit the guestbook on a way that new posts are shown at the top.
When someone adds a post now, it is shown at the bottom.

Thanks

 
surefyre replied on at Permalink Best Answer Reply
surefyre
OK I just tried this and it looked good:

1. From your website root, copy the concrete/guestbook directory into the blocks directory, creating blocks/guestbook.

2. In your blocks/guestbook directory create a directory called 'templates'.

3. Copy your blocks/guestbook/view.php file into this new templates directory and rename it as e.g. date_descending.php

4. in this new date_descending.php file, edit it and change line 59 to read:
$posts = $controller->getEntries('DESC');
by putting 'DESC' inside the brackets.



5. Edit the page with your guestbook block, click the block and select 'Custom template' from the popout menu.

6. In the dialogue box that appears you should now be able to select 'Date descending' as a custom template.

Job done!
prestressed replied on at Permalink Reply
prestressed
Thanks very much, this worked great, but the line I had to change in view.php was line 12 not line 59
flyingstyle replied on at Permalink Reply
Thanks a lot for this instruction.
It works perfect and was exactly what I was searching for.

Greetings
flyingstyle
jackbasting replied on at Permalink Reply
jackbasting
Works great! Thanks