如果用户是HubSpot中列表的一部分,我将尝试显示特定内容。
Psuedo:
If contact_id is part_of_this_list then do this
目前正在从查询字符串中获取联系人ID。我正在尝试检查用户是否在所述列表中,但它不起作用。
方法:
{% set id_querystring = request.query_dict.id %}
{% set registration_list_id = "6136" %} <!-- id of the list I'm checking -->
{% if id_querystring in registration_list_id %}
contact is part of list
{% else %}
contact is not part of list
{% endif %}
我使用以下代码:
{% set list_variable = request_contact.list_memberships|pprint %}
{% if "id of the list you are checking" in list_variable %} ← without the quotes
yes, you are in the list
{%else%}
No, you are not in the list
{%endif%}