libs/cbi: attach pcdata() to template scope and use it