Metamation Developer Notes

  • Developer Notes
  • Resource Map
  • Tools
    • Code Formatting
    • Configuring Git
    • Assignments
    • Testing with Windows Sandbox
    • Single Binary Applications
    • Self-Updating Applications
  • Flux Workflow
    • Flux Workflow
    • Flux Development Style Guide
    • Release notes for Flux
    • SonarCloud analysis for Flux
    • Build a Flux SDK Program
    • Shipping Flux
    • Flux.Test
      • BasicBendAuto Test
      • LaserAuto.cs Detailed Documentation
      • Laserexample:Test1
  • Technical Notes
    • File formats
      • .FX File Format
      • Au(Gold) streams
      • .GEO File Format
      • .LST File Format
      • .LST file - technology
      • .BNC File Format
      • .WAD Files: Flux Resource Packages
      • .Curl Files: ASCII config information
    • Folders App
      • Data\Bendtools
      • Data\Machines
    • FluxCode
      • Welcome & Repo Map
      • Architecture & System Context
      • Subsystem *Bend* (Press Brake)
      • Subsystem *BCell* (Bend Cell Automation)
      • API Maps
      • Data Model Catalog
      • Design Patterns -- A Reader's Guide
      • Tests and Golden Paths
      • Guided Code Tours
      • CAM Glossary with Code Mapping
      • Assignments
      • Flux Onboarding Handbook
    • Data flow
      • Part
        • Part.Dwg
        • Part.Load
        • Part.Load to Part.Dwg
      • BendTech.cs
      • Bend Technology
      • Laser Cutting Technology
    • LTS (Long term support mechanism)
    • Machine ID Scheme
  • FluxTester
    • Commands and Scripts
    • Command Cookbook
    • Script Commands
    • BendTooling.cs Test Inventory
    • LaserTooling.cs Test Steps
    • Fluxtester Recipe Book
    • Nesting.cs Overview
    • Nesting.cs Recipe Book
    • Job.cs Overview
    • Job.cs Recipe Book
  • Software license
  • 3d party software
    • Python
  • Documentation
    • Bento documentation
      • Structure of a Bento page
      • Attributes
    • Software
      • Software Requirement
      • Installation
      • Git workflow for documentation contributors
    • Quick start guide
    • Workflow
      • Roles and responsibilities
      • Analyze
      • Edit
      • Proofread
      • Pre-Publish
      • Publish
      • Release cycle
      • Information required for Documentation Team
      • Checklist for Documenters
    • Styleguide
    • Flavoring
    • Translation
      • Ordering translation for a new document
    • Citations
    • Annotation
Documentation
/
Bento documentation
/
Attributes

Attributes

AsciiDoc attributes enable text substitution and conditional compilation of content. They are particularly useful for generating multiple flavors of a documentation site tailored to different audiences or configurations.

Conditional attributes

Attributes meant for controlling conditional compilation are simply either defined or not, and they take this form in the manifest file:

ATTRIBUTE=trumpf

Such a condition attribute can be used to include some content only if it set, using the ifdef construct in AsciiDoc. For example, in the content below, the second paragraph is included only if the trumpf attribute is defined in the manifest.txt file.

It is possible to program laser machines, press-brakes and panel-benders, and
generate NC code directly.

#ifdef::trumpf[]
Full integration with the Oseon and Fab systems is also available.
#endif::[]

These conditional attributes can also be used in the contents.txt files to include entire topics (or even sub-folders) based on whether an attribute is defined or not. For example, suppose we have a contents.txt file like this:

Introduction
CADSketch       #if(!trumpf)
UIConventions
[Cut]
[Bend]          #if(trumpf)
[Fold]
[Reports]

Then, the CADSketch page is included only if the trumpf attribute is NOT defined, and the entire [Bend] subfolder of content is included only if the trumpf attribute IS defined.

Substitution attributes

These attributes are used to replace a particular tag with appropriate expansion text. These attributes take the following form in the manifest file:

ATTRIBUTE=appName:Flux

For example, suppose a product has different names by which it is marketed in different regions, one could avoid using the actual product name in the documentation, and use instead the attribute tag in curly braces. Assuming an attribute definition as listed above, one could write:

Welcome to \{appName\}!

\{appName\} is an integrated sheet-metal solution.

Contents

  • Conditional attributes
  • Substitution attributes
Structure of a Bento page Software

      Copyright © 2025 TRUMPF Metamation. All rights reserved.

    Compiled by Bento