Home » Forum
NoNumber!

Joomla!® Websites & Extensions
development  -  support  -  consultancy

I try to respond within 48 hours (excluding weekends).
If I haven't responded by then, feel free to post a reminder or bug me via email.

My last reply was: 16 Hours, 11 Minutes ago.

Welcome, Guest
Please Login or Register.    Lost Password?

Add a "Read More" link
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Add a "Read More" link
#5037
Add a "Read More" link 2 Years, 3 Months ago  
Dear all,
I would like to add a "Read Mode" link with sourcerer in an article content.
How should I proceed?
Thank you!
ist101
Posts: 4
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#5040
Add a "Read More" link 2 Years, 3 Months ago  
Please explain... why not use the built in read more option?
If you want it in the article, where does the link have to go to?
Peter van Westen
Admin
Posts: 9165
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#5051
Add a "Read More" link 2 Years, 3 Months ago  
Cause I would like to insert the link in a table that I build within the php code (and not at the end of the introduction as joomla does)
ist101
Posts: 4
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#5058
Add a "Read More" link 2 Years, 3 Months ago  
Well, Sourcerer has the $article variable ready for you to use.
So try seeing what info there is ready for use:
{source}<?php
   print_r( $article );
?>{/source}

So you could do something like:
<a href="<?php echo JURI::root(); ?>index.php?option=com_content&view=article&id={source}<?php echo $article->id; ?>{/source}">Read more...</a>
Peter van Westen
Admin
Posts: 9165
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#5091
Add a "Read More" link 2 Years, 3 Months ago  
Thank you so much.
For now, I don't manage to implement it, because my code is in another file that I include with "require" function.

{source}
<?php
$book_id="ta1";
$pathsyst=dirname( __FILE__ ).'/../../!lib/book/';
$pathhttp='/!lib/book/';
require $pathsyst.$book_id.'/info_fr.php';
require $pathsyst.'book_sum.php';
?>
{/source}

May be I have to use a "global $article;" or so...
I hope I'll find. I don't want to bother.

Thank you for your kind help !
ist101
Posts: 4
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#5100
Add a "Read More" link 2 Years, 3 Months ago  
Sourcerer only creates the $article variable if it finds '$article' in the code. Seeing you have it in a separate file, it can't find it.
You can work around it by simply setting the var like this:
{source}
<?php
$article = $article;
$book_id="ta1";
...

Peter van Westen
Admin
Posts: 9165
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#5117
Add a "Read More" link 2 Years, 3 Months ago  
Thanks you so much Peter!
Your modules and kindness rock!

Here running:
http://vapurl.com/riwkeaqt4m
ist101
Posts: 4
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#5120
Add a "Read More" link 2 Years, 3 Months ago  
My pleasure
Peter van Westen
Admin
Posts: 9165
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
Go to topPage: 1
Moderators: Peter van Westen
Open Source Training | Online Joomla! Training and Support
hosting joomla
MaxCDN | Content Delivery Network | Accelerate your site to the max