Jump to content

KVS 6.2.0 - model gender changes

Recommended Posts

In 6.2.0 we did a change that resulted in backward incompatibility with templates related to model gender.

Previously KVS used model gender values as:

0 = female
1 = male
2 = other

The new model gender values are these:

0 = unspecified / empty
1 = female
2 = male
3 = other

Due to that change, there are 2 issues that may arise after updating to KVS 6.2.0+:

1) In model list there is a filtering possible in default KVS theme by model gender. This article provides info on how to fix the broken sorting.


If template is not updated, this filter stops working correctly.

2) If your theme is customized to display model gender anywhere in other places, such as model list item, or model view block - the displayed value will be wrong due to value index shift. If you have this in place, please check your code and change model gender indexes as needed by shifting gender_id value by 1.


Fixing model list filter

A number of changes will be required:


1. Go to Website UI -> Language files and in every language files that you use you need to change this block:

models.list_gender.0 = Female
models.list_gender.1 = Male
models.list_gender.2 = Other

like this (basically incrementing the last number by 1):

models.list_gender.1 = Female
models.list_gender.2 = Male
models.list_gender.3 = Other


2. Go to Website UI -> Pages -> [Categorization] Models Videos -> Models List block. In block template do changes:


{{if $gender_id|strlen>0}}


{{if $gender_id>0}}



{{if $gender_id|strlen==0 || $gender_id!=0}}


{{if $gender_id!=1}}



{{if $gender_id|strlen==0 || $gender_id!=1}}


{{if $gender_id!=2}}



{{if $gender_id|strlen==0 || $gender_id!=2}}


{{if $gender_id!=3}}


Also these changes:








3. Go to Website UI -> Pages -> [Categorization] Models Albums -> Models List block. In block template do the same changes as in #2 above. This step may be skipped if your project doesn't use albums.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...