I have mulitple brands and want to know how to make a piece of text visible on a specific brand..
I think this is done through composer generation script but can't remember the format.
Not sure how you have set your branding up, but if you are generating multiple brands via a single composer form, by applying different stylesheets through multiple variants in the template, then both text content and visibility rules can be set in the brand specific stylesheets just like any other composer property. If you want to mange the content or the rules at runtime instead of generation time then you need to do what sacha suggests
Would you not just deploy each brand into its own Work Space so that emails are also branded, and staff access transactions based on brand (security configuration for operations)?
Then all you need is a portal parameter which is prefilled via param prefill mapping.
All your visibility rules would then reference a single prefilled data element.
Otherwise, you can just query the URL (assuming that each brand has their own Domain Name):