Naming Conventions - XSLT filenames and Macros
We prefix all our macros and xslt files with a word which
describes the function of the code. This encourages developers to
reuse existing code, improves organisation in the backend and
speeds up templating and workflow.
- - Get
- - Merge
- - List
- - Ext
- - Nav
- - Library
- - Meta
(get) - $currentPage data specific. E.g get Header, get
Body, get Image.
(merge) - $currentPage/nodes specific, display
childen at any depth, used for content mash ups.
(list) - Similar to merge, but should only be
used for list data.
(ext) - Used to output code to other
applications, e.g Flash, RSS Feeds, XML (sitemaps), etc
(nav) - Used for any navigation code.
(library) - References a set of code used by
other code.
(meta) - Code used to display meta
elements.
Any suggestions, or ideas are welcome! :) but this document will
make the macro's in future blog posts make more sense.
Examples...
- (ext)GoogleSiteMap
- (nav)Level1-FrontPage
- (list)NewsItems