Closed S1SYPHOS closed 4 years ago
Still not working .. v3.1.3
Hrm... sorry.... seems github failed to tell me about this issue.... i'll take a look
Thanks very much! Looking forward to a solution, Kirby's built-in excerpt()
is just horrible :slightly_smiling_face:
PHP: 7.3 Kirby: 3.1.3
It's possibly a PHP 7.3 issue.... it works fine for me on 7.1 with last release of Kirby.
If i can get 7.3 running, I'll see if i can fix it.
Well i got PHP 7.3.2 running on my machine, along wit Kirby 3.1.3. I ran the plugin on a fresh starter kit and it works just fine. Have you got anything funky going on in your project?
I wonder what it could be .. I'll have to dig into your code, then .. :confused:
Did you manage to figure out? What was it? And can i close this ticket?
I guess .. updating to the latest version did the trick, in the end.
One thing: How would I go about making the last argument a link?
<?php
$more = Html::tag('a', '→ Read more', [
'href' => $post->url()
]);
?>
<?= $post->text()->chopper(40, 'words', $more) ?>
Not sure i understand what you mean there. You want to append link to it or make the whole chopper output a link?
I'm trying to append it, but the <a>
tag comes out as text
Hmm, personally i just make a link under it, and set the apperend charachter to nothing. If i get some time ill mess around with it.
That's what I did, but coming from WordPress (as some people might still do), where you can append a read more link in that exact spot (being tied to the excerpt), that might be good to know / have.
I mean, why put in an ellipsis (or whatever) if it can't link to the article, right? It's the post's basic indicator like 'follow me, I has contentzz'
// Edit: Anywhoozle, I like that I can display a specific word count now, thanks so much!
I just used this example:
<?= $page->yourtextfield()->chopper(50, 'words', '→') ?>
.. but it doesn't output an arrow at the end. The rest
works like charmalso doesn't work?!