Jump to content

Help with if - else statement needed please!


Maquar

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.