I have a drop down select that I am populating with sites. I've added a lightswitch field (handle 'showInDropDown') to the global set 'siteInfo' with the hope of getting the lightswitch value per site in the loop below.
{% for siteId in currentSite.group.sites %}
{% set setForSiteId = craft.app.getGlobals().getSetByHandle('siteInfo', SiteId =5) %}
{{ setForSiteId.showInDropdown }}
{% endfor %}
The lightswitch field is set to translate per site. setForSiteId is always coming back null:
Impossible to access an attribute ("showInDropdown") on a null variable.
I am not sure if I am missing something. Is there another way to access global variables/values per site?