Search code examples
phpopentbstinybutstrong

opentbs conditional statement in docx


How to show and hide the label [Merk - Track - Type || Location - Certificate], so here goes : when I have a vehicle data, the data appears :

[xtable;block=tbs:page]
Merk        : [xtable.VehicleMerk;noerr]
Track       : [xtable.VehicleTrack;noerr]
Type        : [xtable.VehicleType;noerr]

and land data the data does not appear, and otherwise.

my full code :

[xtable;block=tbs:page]
Merk        : [xtable.VehicleMerk;noerr]
Track       : [xtable.VehicleTrack;noerr]
Type        : [xtable.VehicleType;noerr]
--------------------------------------------------
Location    : [xtable.LandLocation;noerr]
Certificate : [xtable.LandCertificate;noerr]

thanks before.


Solution

  • Answer also posted on the OpenTBS forum.

    The simplest is this : Put your vehicle information in a unique paragraph, and your land information in another unique paragraph.. Then use parameter magnet in order to make a conditional display on the paragraph.

    --------------------------------------------------
    Merk        : [xtable.VehicleMerk;noerr;magnet=tbs:p]
    Track       : [xtable.VehicleTrack;noerr]
    Type        : [xtable.VehicleType;noerr]
    --------------------------------------------------
    Location    : [xtable.LandLocation;noerr;magnet=tbs:p]
    Certificate : [xtable.LandCertificate;noerr]
    --------------------------------------------------