Nearly Perpendicular Macaroons
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    cinc2tplpublic

    CINC 2 Tpl

    Auto create field aware Drupal node.tpl files from CINC Display yaml files.

    This is part of the CINC workflow built @ Aten Design Group

    Getting started

    Install globally via npm npm i cinc2tpl -g

    Go to your root Drupal directory and run cinc2tpl

    Options

    • -f, --force Force file override
    • -d, --destination [value] Template file destination

    How it works

    This will scan your entire Drupal directory for cinc_display.node files and grab the visible fields. It will then compare the field names with the field settings file to create field aware markup for fields in the tpl file.

    For example. If you have an image field it will wrap it with a <figure> tag instead of a <div>

    It will create these files in the root of your directory, which you can then copy to the appropriate theme folder.

    Backlog

    • Create flags for more options and params
    • Create compatability with other entity types
    • Better documentation

    install

    npm i cinc2tpl

    Downloadslast 7 days

    1

    version

    0.1.1

    license

    MIT

    repository

    github.com

    last publish

    collaborators

    • avatar