A bare website showing various examples of how to implement page block types.
If you have any requests for example block types, let us know.
To get started:
- Create a database named 'Cofoundry.Samples.PageBlockTypes' and check the Cofoundry connection string in the config file is correct for you sql server instance
- Run the website and navigate to "/admin", which will display the setup screen
- Enter an application name and setup your user account. Submit the form to complete the site setup.
- Log in and add a page with the General template, click on save and edit to go to the visual editor and play around with the page block types.
Example Page Block Types:
- DirectoryList: Lists pages in a specific directory. Demonstrates searching for pages using
IPageRepositoryand using the
WebDirectoryAttributedata model attribute.
- HorizontalLine: A very simple block type that adds a variable width horizontal line (wrapped hr tag).
- PageList: An orderable list of links to pages. Demonstrates querying for cached page routes using
PageCollectionAttributedata model attribute and generating links to pages from page objects.
- PageSnippet: Displays summary information about a page. Demonstrates the
PageAttributedata model attribute, querying and manipulating block data and handling availability of linked entities (due to draft status).
- Quotation: A quotation block that is output as blockquote with an optional cite tag.
- TextList: A list of text items that displays in an html unordered list, or optional in an ordered list.
- Carousel: A multi-item carousel making use of
NestedDataModelCollectionto allow editing of a collection slides.