You are not logged in.
I would like to place a “read more”-link inside the element of an excerpt –
and for excerpts seem to be covered in p-elements by default, so it should locate before the /p-Tag.
I don’t want to do it by putting the link into the excerpt-form-field, but by including it into the article-form by default.
I couldn’t find any hint in the forum so far.
I tried to manage by setting it outside (an extra p) and defining as inline by CSS, but that is not really what I want, because I want to have clean code without css too – and then a link located within the excerpt-paragraph.
Only the plugin “beginning” is working the way I think of: placing the read-more-link within the excerpt-element. But I need this working for articles that already have an excerpt.
Is there any solution or something I missed to try?
Offline
You can either turn off Textile for the excerpts (under Advanced options), or begin your excerpt with a space, which will prevent the paragraph to be textiled. And then in the article form <p><txp:excerpt />...<txp:permlink>read more</txp:permlink></p>.
Last edited by Els (2006-04-10 17:45:43)
<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields
Offline
Michael,
What’s going on? I haven’t seen you around in awhile. I hope you are well man. I miss our conversations :)
I think that’s got to be a hard coding thing. the <code><txp:excerpt /></code> tag would have to be changed somehow in taghandlers.php, but don’t ask me how, I am only guessing there.
You’re main concern must be for the link to be inside the same paragraph for text-readers and other non-css compatible readers? yes?
Otherwise I guesss you would have styled it into place?
Hmm. I wonder what will come of this one?
Offline
You could do something like this, using the specific plugin(There are actually two of them , the other one is from Nicos, etz_strip_tags,
or using inline php, whatever you prefer.
<code>
<p><txp:sab_striphtml><txp:excerpt /></txp:sab_striphtml> …I need more…</p>
<p><txp:title /></p></code>
The disadvatage of this is, that you only have one pargraph then, if your excert is very long, this would be more annoying then having it wrapped in seperate p tags which IMHO is not un semantic, since you could address this as <code><p class=“more”></code>
regards,marios
Last edited by marios (2006-04-10 19:28:09)
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
Whoa. I did not know about the striptags plugin. That’s really really interesting!
Thanks Marios.
Offline
@matthew
I miss our conversations too. Hope time will grow again in spring (and having some beer in the sun!) :)
You’re main concern must be for the link to be inside the same paragraph for text-readers and other non-css compatible readers? yes?
exactly. it makes more sense
Otherwise I guesss you would have styled it into place?
I’ve done that. But it is not convenient for me. It seems more logic to have it inside the surrounding element for the excerpt.
@els
Thank you. That is a first solution.
But for the people who should continue using the website it would be much better if textile could be active anyway. It’s hard to tell them that in the excerpt-field they have to follow (different) rules of writing.
@marios
Thank you. Didn’t know that there is such a plugin. But loosing paragraphs could be hard.
But let me kno more about the php-thing: Could it be possible used to strip only the last /p-Tag – and place it after the link-code?
Something like: <code><txp:excerpt /><php strip /p> read more …</p></code> ?
Offline
I’m not php-literate enough, but I believe that a function like preg_match_all with the right regular expression woud be necessary to match only the last paragraph before you can use the other function that strips the p tags.
For inline php in TXP the TXP php code convention must be used.
like this<code><txp:php>code here</txp:php></code>
I think that this would be a nice option for kgr_safe_excerpt, you could place a request there.
regards, marios
Last edited by marios (2006-04-10 23:21:37)
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline
UPDATE, I made a little research at the relevant thread as well, I think you can do what you want,
Using This little mod to the kgr_safe_excerpt_plugin,
I’ll try that myself as well, since it could come in handy for some other purpose.
regards, marios
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline