This question involves the Zikula CMS. Is it possible to detect if a viewer is logged in and is a member of a specific group using twig? I would like to have some control code that doesn't show ad blocks if a user is a paying subscriber (is a member of a specific group). Thanks!
Zikula CMS -- Finding User Properties
86 Views Asked by Timothy Paustian At
1
There are 1 best solutions below
Related Questions in TWIG
- Adding a callback when reading from an object in Twig
- Using Twig variable in AngularsJS
- Twig : Unescape hexadecimal text
- Display a findAll() result in a form
- how tune twig without whitespaces
- Symfony2 wildcard routing
- Symfony2 get route name without locale prefix
- traverse twig array in javascript block
- How to check if array has more elements in twigs for loop?
- Inject variable into extended twig form_theme
- How To Pass A Twig Output String Into the urlFor() Function
- Where has the Twig function 'render' in templates gone?
- Edit a full HTML file from PHP using TWIG
- Extending core symfony Form Bootstrap Theme
- Using Twig Variables inside config.yml
Related Questions in ZIKULA
- How to re-code PHP assign-by-reference usage
- Where can i get good resources to start learning the zikula framework?
- Setting up dependency injection for a module in Zikula php and Symfony
- Zikula CSRF token is invalid
- how to keep exif data when using resize option in liipimaginebundle
- Is possible create data faster?
- Symfony Controller magic method?
- How can I manage to have two different toolbars in CKEditor for two different groups?
- Drupal VS Zikula
- Symfony Form ManyToOne OneToMany
- Zikula 1.3.9 News module not accepting google async script
- With which module can I create or blog content in Zikula 2.0.6?
- German language pack for Zikula 1.5.7
- Issue with installing postnuke
- travis+composer repeatedly failing when loading Symfony 2.8.3
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
For most checks like this you won't check for group memberships, but for permissions which are granted by them. So you could for example add a condition like the following to your Twig template:
Note that
MyComponentcan be anything, it is not limited to components used/provided by your installed extensions.You can read more about the
currentUserglobal variable here.