Page 1 of 1

[SOLVED] Need to add .JText:: in a php sting, not sure how?

Posted: Sat Jul 28, 2012 12:23 am
by Chacapamac
The string is:

Code: Select all

<?php if($this->settings['readmore'] === '1'):?>
<p class="xs_readmore"><a href="<?php echo $this->content[$index]->link?>">Readmore..</a></p>
<?php endif;?>
Ihave to add the JText for Readmore..

Not sure , I try without success.... :-[

Re: Need to add .JText:: in a php sting, not sure how?

Posted: Sat Jul 28, 2012 4:40 am
by alikon
should be JTEXT::_('READMORE')
so like this

Code: Select all

<p class="xs_readmore"><a href="<?php echo $this->content[$index]->link?>"><?php echo JTEXT::_('READMORE');?></a></p>

Re: Need to add .JText:: in a php sting, not sure how?

Posted: Sat Jul 28, 2012 3:31 pm
by Chacapamac
I really need to learn more PHP

A thousand time thank you !

Re: [SOLVED] Need to add .JText:: in a php sting, not sure how?

Posted: Sat Apr 29, 2017 10:58 pm
by BurakB
I need to do exactly the same thing for Read More. Can you please advise which file I'll be adding the code below that has the jstring?