No matter on what kind of page the code above is used it will return this:

Cookbook page text

You can make it so your template also understands the demospace parameter. That means you can demonstrate the different appearances of your template in the documentation for your template. Then do like this: