Adding text from Simple Pages to the Homepage...

Can anybody help? I'm looking to include some text from a Simple Page on my theme's homepage (as an extract, amongst other typical homepage features like recently added items), but I keep coming up against a 'View Exception', where I get an error saying 'A current simple_pages_page variable has not been set to this view.'

Any help would be really appreciated!!

What are you trying?

Seeing an extract or sample of the code you're adding in the theme would help here. It's probably just a situation where you need to set the "current" simple page, or pass the page object into a function you're using.

I'm taking the contents of SimplePages/views/public/page/show.php and adding it to my theme's index.php...

I'm pasting the following into the #primary div...

<h1><?php echo metadata('simple_pages_page', 'title'); ?></h1>
<?php
$text = metadata('simple_pages_page', 'text', array('no_escape' => true));
if (metadata('simple_pages_page', 'use_tiny_mce')) {
echo $text;
} else {
echo eval('?>' . $text);
}
?>

How do I set the "current" simple page?

Thanks for your reply!

So, do you have any code on the homepage that's actually getting the page you want to show?

Once you have that, you can just do

set_current_record('simple_pages_page', $page);

You're right, I don't have any code requesting the specific page I want - how would I do that? Sorry, I'm very new to this!