MODIFICATION: Display extra fields separately.

This is a discussion on MODIFICATION: Display extra fields separately. within the Module Release forums, part of the v4 Help & Support category; Step 1. Go to your administration -> extra fields and note the id of the extra field. Step 2. Open ...


Go Back   68 Classifieds Forums > v4 Help & Support > Module Release

 
LinkBack Thread Tools Display Modes
  #1  
Old 02-27-2008, 11:13 PM
cwp's Avatar
cwp cwp is offline
Senior Member
 
Join Date: Jun 2007
Posts: 297
Rep Power: 13
Default MODIFICATION: Display extra fields separately.

Step 1. Go to your administration -> extra fields and note the id of the extra field.

Step 2. Open the viewlisting template file add this code to the top of the template file replacing 4 with the id from step 1:

Step 3: Now change the word name to whatever you want.

Code:
{foreach from=$extrafields item=extras}
        {if $extras.fID==4} 
            {foreach key=key item=item from=$extras.value}
                {assign var="name" value="$item"}
            {/foreach}
        {/if}
    {/foreach}
Step 3: Now you can use {$name} wherever you want to on the viewlisting.tpl template.


In order to display a extra field by itself with the field type of "check boxes" in the viewlisting template use this code where you want it to be displayed:

Code:
{foreach from=$extrafields item=extras}
{if $extras.fID==1} 
{foreach key=key item=item from=$extras.value}
{$item}<br />
{foreachelse}
{$extras.value}
{/foreach}
{/if}
{/foreach}
There may be an easier way of doing the extra fields with the field type of "check boxes" but this method works for now.

Credit goes to Suzkaw.
__________________
Version 4.0.3 Developer
Reply With Quote
  #2  
Old 05-29-2008, 03:30 PM
Senior Member
 
Join Date: Jun 2007
Posts: 109
Rep Power: 8
Default

I've been looking for a way to put my extra fields seperately in the listing. Would I need to define a 'name' for each extra field individually (so copy all the code in the {foreach} tags for each extra field)?

Thanks!
__________________
Crystal
v4.0.8 Dev
Reply With Quote
  #3  
Old 05-30-2008, 02:20 PM
cwp's Avatar
cwp cwp is offline
Senior Member
 
Join Date: Jun 2007
Posts: 297
Rep Power: 13
Default

I've been looking for a way to put my extra fields seperately in the listing.

Then this mod will work perfectly for you.


Would I need to define a 'name' for each extra field individually (so copy all the code in the {foreach} tags for each extra field)?

Nope, just make sure you have the id's correctly.
__________________
Version 4.0.3 Developer
Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Display extra fields by themselves? cwp v4 Questions & Support 3 02-22-2008 03:34 AM
Extra User Fields in Registration signup "Pull Down Menus" LittleRascal v3.1 Modules & Modifications 3 11-10-2007 10:04 AM
Extra fields bug? Sinisa v3.1 Questions & Support 8 01-24-2007 03:20 PM
extra fields in the listing modification Acpjax v3.1 Questions & Support 4 11-20-2006 01:20 PM


All times are GMT -4. The time now is 09:39 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22