jimie VIP
Total posts: 531
09 Oct 2014 13:48

Hello Sergey,

Could you tell me how can I check if item is published or unpublished ?

I found that for published i can check with:

<?php if($item->published) echo ' <code></code>'; ?>

but how I can check for unpublished or waiting approval ?

Rgds

Last Modified: 10 Oct 2014


klox7 VIP
Total posts: 914
09 Oct 2014 13:57

unpublished = 0 published = 1

maybe

<?php if($item->published == 1): ?>
    <?php echo 'Published'; ?>
<?php else: ?>
    <?php echo 'Unpublished'; ?>
<?php endif; ?>

You can check waiting approval in my menu in section.


Sergey
Total posts: 13,748
10 Oct 2014 01:56

jimie I can check for unpublished or waiting approval ?

Those states are the same. unpublished is waiting for approval for one who have no rights to publish.

Powered by Cobalt