Support Forums

Hiding extrafields

This is a discussion on Hiding extrafields within the Technical Support forums, part of the Technical Support Forums category; v4.2.2 Developer Custom template Is there a way to hide extrafield when the field is empty ex.: Code: <div> <p>Specification</p> ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

Reply
 
Thread Tools Display Modes
Old 05-26-2011, 02:24 PM   #1
Customer
 
Join Date: Nov 2008
Posts: 4
Rep Power: 0
oktanedesign is on a distinguished road
Default Hiding extrafields

v4.2.2 Developer
Custom template


Is there a way to hide extrafield when the field is empty ex.:

Code:
<div>
<p>Specification</p>
<p>{get_extra_field id=$view fid=60}</p>
</div>
So i would like to hide all the div block if the extrafield 60 is empty...
__________________
v4.0.9 Developer
oktanedesign is offline   Reply With Quote
Old 05-26-2011, 03:14 PM   #2
Developer & Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,311
Rep Power: 69
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

There is not any way to do this by default or changing settings.

What I have done to overcome this is made a custom extra fields plugin instead of using the standard extra field plugin that only gets the extra field value.

I give this custom plugin by request with my Custom Viewlistngs Module, giving you the ability to customize the viewlisting template on a category by category basis.

The custom extra fields plugin is versatile in it's output allowing several different types of output to fit the type of extra field that you're getting and the design of your template.

Regardless of which type of output that you select, by default it returns "nothing" if the value for the field is empty. ("nothing" as in empty, nothing is sent to the template, not the word nothing. )
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2,5.0)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
V4.1.x Hiding adult ads in new ads clickweb Modules / Plugins / Modifications 3 06-08-2010 11:00 AM
extrafields seymourjames Technical Support 4 05-22-2008 07:43 PM


All times are GMT -4. The time now is 02:36 PM.


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