Creating Smart Pages

The SmartPage template allows you to quickly create your own content rich pages by using your favorite news dapp.

All you need to do is follow these 3 simple steps:

  1. create/find a dapp that extracts an image, title, and summary
  2. create a wiki page
  3. invoke the SmartPage template with the name of your dapp

Step 1. Create/find a dapp

Go to Dapper and create a dapp that extracts these fields:

  • image: an image to use in the story
  • title: a linked title to use in the story
  • summary: a summary to show in the story and to analyze

There are already a couple of dapps you can use right off the bat:

Step 2. Create a wiki page

The best place to experiment with your dapp is on your user page.  Just register and click on MyPage in the top left corner to go to your own page.  Now click "New Page" and start experimenting away!

Step 3. Invoke the SmartPage template

Now, all you need to do is type in the following.  This will use the default YahooTopStory dapp.

{{ template.smartpage{ } }} 

Or to switch to another dapp, invoke the template like this:

{{ template.smartpage{ name: 'CnnTopStory' } }} 

Finally, if your dapp requires arguments or an input uri, you can pass them in as well:

{{ template.smartpage{ name: 'MyDapp', input: 'http://my-uri', args: { var: 'value' } } }}