[Solved] Product Module - If "empty" statement
Posted: Wed Feb 04, 2015 3:40 pm
----------------------------------------------
Cms Version: 1.11.10
Installed Modules:
CMSMailer: 5.2.2
FileManager: 1.4.4
MenuManager: 1.8.6
ModuleManager: 1.5.5
News: 2.14.2
Printing: 1.0.4
Search: 1.7.11
ThemeManager: 1.1.8
TinyMCE: 2.9.12
FCKeditorX: 1.1.0
CGExtensions: 1.44.5
NMS: 2.3.2
FrontEndUsers: 1.25.1
CustomContent: 1.10
Calendar: 0.8.2
Showtime: 3.4
CMSPrinting: 1.0.5
MicroTiny: 1.2.6
JQueryTools: 1.2.6
CGSimpleSmarty: 1.7.4
Products: 2.21
CGEcommerceBase: 1.5.2
Cart2: 1.1.3
FormBuilder: 0.8
Uploads: 1.18.5
SelfRegistration: 1.8.3
Captcha: 0.5.0
Config Information:
php_memory_limit:
process_whole_template:
max_upload_size: 128000000
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: false
Php Information:
phpversion: 5.6.4
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 2048
E_DEPRECATED: 0
memory_limit: 128M
max_execution_time: 60
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 128M
session_save_path: No check because open basedir active
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
Server Information:
Server Api: cgi-fcgi
Server Db Type: MySQL (mysql)
Server Db Version: 5.0.95
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Server Time Diff: No filesystem time difference found
----------------------------------------------
I am using the product module for our website and would like to show a link to instructions (pdf) only if the "instruction field" contains a value (link)..
This is what i currently have but it shows "PDF" for everything including ones which do not contain a link in the field. (Duh..)
What is the correct if/else statement one would use for something like that?
<a target="_blank" href="{$entry->fields.instructions->value}">PDF</a>
Thanks again!!
Cms Version: 1.11.10
Installed Modules:
CMSMailer: 5.2.2
FileManager: 1.4.4
MenuManager: 1.8.6
ModuleManager: 1.5.5
News: 2.14.2
Printing: 1.0.4
Search: 1.7.11
ThemeManager: 1.1.8
TinyMCE: 2.9.12
FCKeditorX: 1.1.0
CGExtensions: 1.44.5
NMS: 2.3.2
FrontEndUsers: 1.25.1
CustomContent: 1.10
Calendar: 0.8.2
Showtime: 3.4
CMSPrinting: 1.0.5
MicroTiny: 1.2.6
JQueryTools: 1.2.6
CGSimpleSmarty: 1.7.4
Products: 2.21
CGEcommerceBase: 1.5.2
Cart2: 1.1.3
FormBuilder: 0.8
Uploads: 1.18.5
SelfRegistration: 1.8.3
Captcha: 0.5.0
Config Information:
php_memory_limit:
process_whole_template:
max_upload_size: 128000000
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: false
Php Information:
phpversion: 5.6.4
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 2048
E_DEPRECATED: 0
memory_limit: 128M
max_execution_time: 60
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 128M
session_save_path: No check because open basedir active
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
Server Information:
Server Api: cgi-fcgi
Server Db Type: MySQL (mysql)
Server Db Version: 5.0.95
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Server Time Diff: No filesystem time difference found
----------------------------------------------
I am using the product module for our website and would like to show a link to instructions (pdf) only if the "instruction field" contains a value (link)..
This is what i currently have but it shows "PDF" for everything including ones which do not contain a link in the field. (Duh..)
What is the correct if/else statement one would use for something like that?
<a target="_blank" href="{$entry->fields.instructions->value}">PDF</a>
Thanks again!!