Keyword

JRequest::getInt('print') Not Working

  • matthew hill
  • matthew hill's Avatar Topic Author
  • Offline
  • New Member
More
11 years 8 months ago #109389 by matthew hill
JRequest::getInt('print') Not Working was created by matthew hill
I am currently trying to create a template on a step-by-step basis and the statement

<?php if(JRequest::getInt('print')==1): ?>
<!-- Print button at the top of the print page only -->
<a class="itemPrintThisPage" rel="nofollow" href="#" onclick="window.print();return false;">
<span><?php echo JText::_('K2_PRINT_THIS_PAGE'); ?></span>
</a>
<?php endif; ?>

has me baffled.

Despite having the Category Template pointing to this new layout and the Category > Item View Options > Print Button set to Show, the "Print" button does not display.

I even used the following code to test these statements:

<?php echo($this->item->params->get('itemPrintButton')); ?>
<br />
<?php echo(JRequest::getInt('print')); ?>

Which resulted in 1 and 0 respectively.

Any idea what I am missing to get this relatively simple piece of code working?

Please Log in or Create an account to join the conversation.

  • matthew hill
  • matthew hill's Avatar Topic Author
  • Offline
  • New Member
More
11 years 8 months ago #109390 by matthew hill
Replied by matthew hill on topic Re: JRequest::getInt('print') Not Working
I now realise that the question relates to the 'print' pop-up page and this code presents itself upon that.

Many thanks

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum