Live Preview

semargl's picture
semargl
Wed, 07/22/2015 - 13:34
#1
Live Preview

I'm not getting the purpose of "Live Preview" button. I suppose it's just a link to something, isn't it?

Any way to make it disappear if the field is empty?

phuonght's picture
phuonght
Wed, 07/22/2015 - 22:34

Hi,

Where is "Live preview" button that you mentioned? Could you send us some screenshots?

semargl's picture
semargl
Thu, 07/23/2015 - 09:31

Please, see the screen attached.

Image title

cindy's picture
cindy
Thu, 07/23/2015 - 22:54

Hi,

1. Go to theme md_phoenix
2. And go to md_phoenix/template
3. Open file node--portfolio.tpl.php
4. Replace the following code:


<a class="btn btn-default btn-black" href="<?php (isset($node->field_portfolio_link['und'])) ? print $node->field_portfolio_link['und'][0]['value'] : print '' ?>">
<?php print t('Live Preview'); ?>
</a>

with the code:

<?php if(isset($node->field_portfolio_link['und'])) :  ?>
<a class="btn btn-default btn-black" href="<?php print $node->field_portfolio_link['und'][0]['value']; ?>">
<?php print t('Live Preview'); ?>
</a>
<?php endif; ?>

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.