The contents of this article may be outdated and no longer applicable to the newest version of Pagestead (version 1.1.0). We’ll keep this article around for a while for those who are using older versions of Pagestead, however the article will be deleted in the near future. For more up to date information on block management, please review the Managing Blocks & Components section.
Pagestead block template files are build mostly using regular HTML, and as a block author you’re free to use whatever markup you like, as long as it is valid HTML5 markup. Below you’ll see an example of the basic structure of one of the bundled block templates:
All external assets in your block template files should be loaded using relative paths, using absolute paths will cause your blocks to be unusable by Pagestead!
Within the body tag, the first element we’ll see is a tag with its id attribute set to “#page”. This is the element containing your block, and you will want to make sure the value of the id attribute matches with the CSS3 selector set in the “module.exports.pageContainer” object in the /asssets/js/modules/config.js file:
module.exports.pageContainer = "#page";
Everything that follows beyond the wrapping with id = ‘#page’ is pretty much unrestricted, i.e. you can use whatever markup you want or whatever markup is dictated by your choice of CSS/HTML framework. Pagestead’s page builder does require certain markup and/or data-attributes for the blocks to make full use of the builder’s features and functionality.