You can use context to determine if an Element will be included in your page or not. If a condition of the context is true (it passes), the Element will be included. If the condition of the context is false (it fails), the Element will not be included. Context are processed on the server. This means if a condition of a context is false, the Element will not be rendered in your page HTML.
Context based rendering has a dependancy on the Context module.
Context visibility is used to show an Element only if a condition of a specific context is true. For example:
Contexts are created using the Context and Context UI modules. https://www.drupal.org/project/context These are popular contributed Drupal modules.
When you have these modules installed, you can create Contextual conditions:
At this point, you have created a Context with no conditions. This tells your website to unconditionally hide everything. You must add a condition to your Context.
To add a Condition:
You've now created a Contextual condition that checks if a user of your website is logged in.
Once you have created a Contextual condition, you can apply it to an Element to determine if the Element should be included or excluded from your page. We call this Context visibility.
To apply context visibility:
You can add multiple contexts to an Element to determine if it should be visible. Use this to create more complex sets of contextual conditions. For example, Only show an Element if the user is Logged in and the URL includes the variable.
To add multiple context:
If this content did not answer your questions, try searching or contacting our support team for further assistance.
Wed Mar 26 2025 01:07:19 GMT+0000 (Coordinated Universal Time)