uhf

1.2.4 • Public • Published

UHF

Universal Header and Footer

Simple getter for the UHF service


Install the package from npm.

npm install uhf

Require the package.

var uhf = require('uhf');

Specify the options.

var uhfOptions = {
  locale: "es-es",
  partnerId: "uhfportal",
  headerId: "uhfportalheader",
  footerId: "uhfportalfooter",
}
Option Description
locale Culture code for localized string (lang-loc)
partnerId UHF Partner ID
headerId File name of the header document
footerId File name of the footer document
env Enviroment (ppe, test, or dev; default is production)
targeting Compass targeting tags to add to the query, separated by '&'
preview Retrieve unpublished Compass content
debug Include unminified code for easier debugging
version UHF version (classic or onerf, default is onerf)

Get the UHF, passing the options. Define your callback and check for errors.

uhf.getUhf(uhfOptions, function(error, uhfResult) {
  if (!error) {
    res.render('index', { title: 'Express', uhf: uhfResult });
  }
  else {
    console.log(error);
  }
})

Dependents (0)

Package Sidebar

Install

npm i uhf

Weekly Downloads

2

Version

1.2.4

License

ISC

Last publish

Collaborators

  • michaelcampbell