{% spaceless %} {% autoescape false %} {% set subject = profileItem %} {% set profile = item.profile %} {% set profileUrl = 'https://www.rueduprof.com/' ~ profile.id ~ '/professeur-' ~ profile.department ~ '-' ~ (profile.firstname|myslugify) ~ '-' ~ (profile.lastname|first|myslugify) ~ '/' %} {% set firstName = profile.firstname|lower|capitalize %} {% set lastName = profile.lastname|upper %} {% set teacherName = (firstName) ~ ' ' ~ (lastName) %} {% set city = profile.city %} {% set postalCode = profile.department %} {% set country = profile.country|upper %} {% set cleanContent = profile.content|striptags|replace({'\n': ' ', '\r': ' '}) %} {% set visibleBio = profile.content ? (cleanContent|length > 350 ? cleanContent|slice(0, 350) ~ '...' : cleanContent) : 'Annonces de Cours particuliers sur RueduProf.' %} {% set profileImageUrl = profile.avatar is not null and profile.avatar.path is not empty ? 'https://www.rueduprof.com/uploads/avatar/' ~ profile.avatar.path : null %} {% set subjects = [] %} {% for item in profile.categories %} {% if item.category and item.category.name %} {% set subjects = subjects|merge([item.category.name]) %} {% endif %} {% endfor %} {% set subject1 = subjects[0] is defined ? subjects[0] : '' %} {% set subject2 = subjects[1] is defined ? subjects[1] : '' %} {% set subject3 = subjects[2] is defined ? subjects[2] : '' %} {% set subjects = subjects|slice(0, 3) %} {% set visibleJobTitle = subjects|length ? 'Professeur' ~ (subjects|length > 1 ? '' : '') ~ ' de ' ~ subjects|join(' et ') : 'Professeur particulier' %} {% set profileSlug = 'professeur-' ~ profile.department ~ '-' ~ (profile.firstname|myslugify) ~ '-' ~ (profile.lastname|first|myslugify) %} {% set subjectUrl = 'https://www.rueduprof.com' ~ path('app_profileCategory_show', { profile: profile.id, slug: profileSlug, skill: item.category.slug, id: item.id, from: app.request.query.get('from') }) %} {% set school1 = 'Université Paris Cité' %} {% set school2 = 'Lycée Buffon' %} {% set credential1 = 'Master de Mathématiques appliquées' %} {% set price1 = '35' %} {% set level1 = 'Collège' %} {% set level2 = 'Lycée' %} {% set firstName = item.profile.firstname|lower|capitalize %} {% set lastName = item.profile.lastname|upper %} {% set categoryName = item.category.name|default('') %} {% set firstLetter = categoryName|first|lower %} {% set useApostrophe = firstLetter in ['a', 'e', 'i', 'o', 'u', 'à', 'â', 'ä', 'é', 'è', 'ê', 'ë', 'î', 'ï', 'ô', 'ö', 'ù', 'û', 'ü'] %} {% set label = item.category.type == 'formations' ? 'Formation' : (item.category.slug == 'coach-sportif' ? 'Séance haut de gamme' : 'Cours particuliers') %} {% set title %}{{ label }} {% if useApostrophe %}d'{% else %}de {% endif %}{{ categoryName }}{% if item.profile.city %} à {{ item.profile.city }}{% if item.profile.department %} ({{ item.profile.department }}){% endif %}{% endif %}{% if item.profile.firstname and item.profile.lastname %} avec {% if item.profile.user.device != 'ANDROID' %}{{ item.profile.firstname }} {{ lastName }}{% else %}{{ item.profile.firstname }}{% endif %}{% endif %} {% endset %} {% set category = item.category %} {% set isFormation = category.type == 'formations' %} {% set isCoachSportif = category.slug == 'coach-sportif' %} {% set categoryPrefix = category.name|first|lower in ['a', 'e', 'i', 'o', 'u', 'h'] ? "d'" : 'de ' %} {% set courseLabel = not isCoachSportif ? (isFormation ? 'Formations ' : 'Cours particuliers ') : '' %} {% set cityLabel = (location.city and location.slug != 'en-ligne') ? ' à ' ~ location.city : '' %} {% set zipcodeLabel = location.zipcode != 75 ? ' (' ~ location.zipcode ~ ')' : '' %} {% set fullLabel %} {{ courseLabel }}{% if courseLabel %} {% endif %}{% if not isCoachSportif %}{{ categoryPrefix }}{% endif %}{{ category.name }}{{ cityLabel }} {{ location.name|prefix }}{{ zipcodeLabel }} {% endset %} {% set fullLabel = fullLabel|trim %} {% endautoescape %} {% endspaceless %}