|
Flyspeck lets people edit static files with ease - but sometimes you want a little more. Flyblocks allow you
to add a special <div> tag to a page, that reads content from other web page files, on the fly!
It's a magic "include" tag, that works with the flyspeck engine, to repurpose content.
Imagine the possiblities!
- A Random Article Block on your homepage, that rotates with each refresh
- A "Blog" style layout (ala Joomla) to create "auto indexing" pages
- A Dynamic "Table of Contents" to autolinks to a series of pages
- A "Navigation" section of pages that updates itself when people add new pages.
Flyblocks leverage the already good work you have done wrapping portions of your page with <!-- #Edit --> tags, and creates a virtual "database" based on these tags.
The content is formatted according to your tag and included via ajax, so fast your users won't even know!
This allows for blog style layouts, table of contents, or any other custom template you specify.
Flyspeck comes with lots of defaults to make it super easy, and provides a starting point for any custom work you need.
For example, let's say you have a directory called "/articles" on your site, and you want to provide a sort of "bloggy" type homepage feel in the index.html.
You want to show latest articles first, two columns, with 5 articles per page. You can add
this simple tag to the page, where you want the blog layout to appear:
<div class="flyblock" type="Articles" template="Blog" perpage="5" leading="1" sort="modified"></div>
that's it!
There are many custom parameters you can supply, such as columns, sort order, a custom filter (to query or exlude certain named file for example), limit, perpage, and basedir.
You can easily copy the default template to _mytemplates and add any styling or layout changes you need. We also have templates for table layout, and a navigation. But you can easily supply any other name, and
customize to your heart's content - it is just like data from a database, only coming out of your flyspeck files.
|