PDA

View Full Version : Listing Form Builder



Aleksandar Apostolovski
November 10, 2018, 11:30 PM
Hello,
how can I add the Make/Model field in the Listing Form Builder?
I can use it in the Browse Form Builder but it's not available in the Listing Form Builder.

Rudi
November 12, 2018, 03:51 AM
Hello,

you can't use it on add-listing form because it's a system field and related to categories which you select on categories step

Aleksandar Apostolovski
November 12, 2018, 06:13 AM
If I use the Multifield to recreate the Make/Model with it then it would be seen in the ads, right?

Rudi
November 12, 2018, 09:07 AM
Yes, but there is no need to do so when you can add 'Make/Model' field to Listing Title Form or Browse Form
on listing details page category info can be viewed from breadcrumbs

but if you want to add additional category info to the page you can insert this code anywhere you need via ftp > templates > your template > tpl > controllers > listing_details.tpl:


<div style="display: inline-block"><span class="name">{$lang.category}</span></div>
<div style="display: inline-block"><span class="count"><a title="{$lang[$listing_data.Category_pName]}" href="{$rlBase}{if $config.mod_rewrite}{$pages[$listing_type.Page_key]}/{$listing_data.Path}{if $listing_type.Cat_postfix}.html{else}/{/if}{else}?page={$pages[$listing_type.Page_key]}&category={$listing_data.Category_ID}{/if}">{$lang[$listing_data.Category_pName]}</a></span>
</div>

Aleksandar Apostolovski
November 12, 2018, 09:22 AM
Thank you Rudi. I will try some of the suggested options.

Aleksandar Apostolovski
November 24, 2018, 01:36 AM
Yes, but there is no need to do so when you can add 'Make/Model' field to Listing Title Form or Browse Form
on listing details page category info can be viewed from breadcrumbs

but if you want to add additional category info to the page you can insert this code anywhere you need via ftp > templates > your template > tpl > controllers > listing_details.tpl:


<div style="display: inline-block"><span class="name">{$lang.category}</span></div>
<div style="display: inline-block"><span class="count"><a title="{$lang[$listing_data.Category_pName]}" href="{$rlBase}{if $config.mod_rewrite}{$pages[$listing_type.Page_key]}/{$listing_data.Path}{if $listing_type.Cat_postfix}.html{else}/{/if}{else}?page={$pages[$listing_type.Page_key]}&category={$listing_data.Category_ID}{/if}">{$lang[$listing_data.Category_pName]}</a></span>
</div>


Rudi I've tried the code and I got this: Category X5
Can you edit the code so I would get:
Make: BMW
Model: X5

Thanks in advance!

Rudi
November 26, 2018, 05:29 AM
Use this:



{if $listing_data.Parent_keys}
{assign var='parent_cats' value=','|explode:$listing_data.Parent_keys|@array _reverse}
{assign var='parent_key' value='categories+name+'|cat:$parent_cats[0]}
<div>
<span style="display: inline-block" class="name">Make: </span>
<span style="display: inline-block" class="count">{$lang[$parent_key]}</span>
</div>

<div>
<span style="display: inline-block" class="name">Model: </span>
<span style="display: inline-block" class="count">{$lang[$listing_data.Category_pName]}</span>
</div>
{else}
<div>
<span style="display: inline-block" class="name">Make: </span>
<span style="display: inline-block" class="count">{$lang[$listing_data.Category_pName]}</span>
</div>
{/if}

Aleksandar Apostolovski
January 26, 2019, 09:21 PM
Use this:



{if $listing_data.Parent_keys}
{assign var='parent_cats' value=','|explode:$listing_data.Parent_keys|@array _reverse}
{assign var='parent_key' value='categories+name+'|cat:$parent_cats[0]}
<div>
<span style="display: inline-block" class="name">Make: </span>
<span style="display: inline-block" class="count">{$lang[$parent_key]}</span>
</div>

<div>
<span style="display: inline-block" class="name">Model: </span>
<span style="display: inline-block" class="count">{$lang[$listing_data.Category_pName]}</span>
</div>
{else}
<div>
<span style="display: inline-block" class="name">Make: </span>
<span style="display: inline-block" class="count">{$lang[$listing_data.Category_pName]}</span>
</div>
{/if}


Rudi can you edit the code so I can get the result in the attached picture? I need the Make/Model just in the specific group key = techdata with the same style like the other fields in that group.