<block class="Magento\Framework\View\Element\Template" name="test"
               template="test/example.phtml" />

In above example for class used '\' and template '/'

use Magento\Framework\Escaper;
const XML_PATH_EMAIL_SENDER = "trans_email/ident_custom2/email";

Again we used both. So when to use '/' and '\'?

1 Answer 1


const XML_PATH_EMAIL_SENDER = "trans_email/ident_custom2/email";

Magento store data of configuration as '/' format.

Regarding '\' , it's PHP format.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.