MiniFrontpage readmore make external
- Posted by John Tower (5) Offline
I just want to ask if how to link the readmore to external link? any possible way to do it?
For example I want to link readmore button to an external link. Any possible hack to do this? I believed this is very useful if you're going to display both internal post and external.
Thank you!
11 years 4 months ago #1
by John Tower
For example I want to link readmore button to an external link. Any possible hack to do this? I believed this is very useful if you're going to display both internal post and external.
Thank you!
Please Log in or Create an account to join the conversation.
- Posted by andy (759) Offline
Hi John, unfortunately this is not possible at the moment as the readmore link is generated automatically from the article
11 years 4 months ago #2
by andy
Please Log in or Create an account to join the conversation.
- Posted by John Tower (5) Offline
Thank you so much for your quick reply.
I'm thinking if you could help me with this simple solution in my mind.
In article view edit mode (backend) I'm planning to add the external link in EXTERNAL REFERENCE field and make a condition whether to display the READ MORE BUTTON(default link) or READ MORE BUTTON(w/ external link).
Something like this: "xref is the value of External Reference"
11 years 4 months ago #3
by John Tower
I'm thinking if you could help me with this simple solution in my mind.
In article view edit mode (backend) I'm planning to add the external link in EXTERNAL REFERENCE field and make a condition whether to display the READ MORE BUTTON(default link) or READ MORE BUTTON(w/ external link).
Something like this: "xref is the value of External Reference"
$xref = $metadataParams->get('xreference');
<a href="<?php echo $xref; ?>" target="_blank" title="<?php echo $atitle ?>">
<?php else : ?>
<a href="<?php echo $link; ?>" title="<?php echo $atitle ?>" class="item-link">
<?php endif; ?>
Please Log in or Create an account to join the conversation.
- Posted by andy (759) Offline
Hi John, Please try this following workaround :
1. Open the mod_minifrontpage.xml, add this line anywhere you want2. Open mod_minifrontpage.php, add this line arround line 90 :3. Find this code in all files under the folder /mod_minifrontpage_tableless/themes :replace with :
11 years 4 months ago #4
by andy
1. Open the mod_minifrontpage.xml, add this line anywhere you want
<field name="xlink" type="text" default="" label="External Link" description="External Link Desc"></field>
$xlink = $params->get( 'xlink', '' );
<a class="mfp-readon" href="'.$item->link.'">'.$fulllink.'</a>
<a class="mfp-readon" href="'.$xlink.'">'.$fulllink.'</a>
Please Log in or Create an account to join the conversation.
- Posted by John Tower (5) Offline
Here's the attached file. Meta data External Reference field.
11 years 4 months ago #5
by John Tower
$xref = $metadataParams->get('xreference');
<?php if (!empty($xref)): ?>
<a href="<?php echo $xref; ?>" target="_blank" title="<?php echo $atitle ?>">
<?php else : ?>
<a href="<?php echo $link; ?>" title="<?php echo $atitle ?>" class="item-link">
<?php endif; ?>
Please Log in or Create an account to join the conversation.