Reference this post - Conditional Statements
The documentation states that "Elements gives you access to the current RapidWeaver mode inside of conditional statements”.
In the documentation the modes are not specifically listed, though edit and preview are shown in examples. Is there a mode for published?