Maquar Posted December 26, 2009 Share Posted December 26, 2009 Hello everyone, I am trying to add a custom field (file version) to a document manager (DOCman) on my joomla based website. Basically, I am trying to have the output say "Hey, if no file version has been entered in a document then print this unless a file version has been entered into a document then print the file version. Here is the code I have right now: <?php // output document file version if ( $this->theme->conf->details_dm_fileversion ) : ?> <tr> <td><strong><?php echo _DML_TPL_DM_FILEVERSION;?>:</strong></td> <td><?php if ($this->doc->data->dm_fileversion == '') { echo _DML_UNKNOWN; } else { echo $this->doc->data->dm_fileversion; } ?></td> </tr> <?php endif; ?> In a language file: _DML_TPL_DM_FILEVERSION = Version _DML_UNKNOWN = Unknown The problem I am having is every document is showing Unknown next to the text Version even though I have entered a file version. There are probably more details needed but I am just wondering if anyone sees anything wrong with the above code. Thank you for any input! Mark Link to comment https://forums.phpfreaks.com/topic/186391-help-with-if-else-statement-needed-please/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.