Good day.
I try to print the phone number in the listing.tpl template.
{$listing.phone_number}
On an output I receive
c: 7983 | a: 321 | n: 5599
How do I correctly do this.
Template: Escort Wide
Printable View
Good day.
I try to print the phone number in the listing.tpl template.
{$listing.phone_number}
On an output I receive
c: 7983 | a: 321 | n: 5599
How do I correctly do this.
Template: Escort Wide
one way could be
{$listing.phone_number|replace:c:':' '|replace:'a: ':' '|replace:'n: ':' '|replace:'|':''}
Hello,
You can get your value using this path: {$listing.fields.phone_number.value}
2 Rudi
How do I add in $listing.fields I have only the country and country2.
You should go to Categories > Categories > your primary category or parent category > Build > Build Browse Form > add fields you need
and then use them: {$listing.fields.your_field_key.value}
but you should disable them for standard displaying:
find <li class = "fields"> and add your field to {if...} area like this:
Code:Only registered members can view the code.
Yeeeehaaaaaaa Rudi very very thanks :wub: :))))))
2Rudi
Another question, perhaps when adding a new profile by default, set the country code when adding a phone.
By default, there is no such feature
it can be implemented as a customization
but you can set a default value for 'code' section that will be always displayed on profile form:
for that you should go to templates > your template > tpl > blocks > field.tpl > find a row "{elseif $field.Type == 'phone'}" > in first "input' change a code
from:
to:Code:Only registered members can view the code.
Code:Only registered members can view the code.
If you need to use multiple codes to allow user to select his code you can do the following:
go to Common > Data Entries > create an entry with necessary country codes
then go to Listings > Listing Fields > your phone field > Edit > Link to Data Entries > select your country codes entry
in 'Field format' uncheck 'Code' option > Save
And now the 'Area' part will be represented as 'Code' section with dropdown list on profile form
Hello Rudi,
The first solution is not worked with me, so I tried the second solution but the country code (999) replaced by Area code instead of Country code. Attachment 3822
Attachment 3823 screenshot attached
Hello,
What exactly do you need to achieve?
Do you need to use the dropdown list for area code part?
It will require a customization
or follow the instructions below to set default country code value
Hello Rudi,
I followed the mentioned instructions but it doesn't work :unsure: