Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2013-07-23 11:47:11
- Keepital
- Member
- Registered: 2013-07-11
- Posts: 13
'article_balloons' form; excerpts; if-than statement
I would like excerpts to display for all 3 article balloons on my home page. Currently, there is an if-than statement in my article_balloon form, and only the first article is showing the excerpt. I don’t know how to change an if-than statement, and I don’t want to do it wrong.
Can someone please tell me how in the following text I could change this?
I can see in the bottom 3 lines of code that it tells the form to display the excerpt for the first article, but I don’t know how to change an if-than statement so the form will show the excerpt for all 3 front-page articles.
<div class="<txp:if_first_article>first-</txp:if_first_article>article">
<h3><a href="<txp:permlink />" title="<txp:title />"><txp:title /></a></h3>
<p class="very-small">Posted on <txp:posted format="%a %m/%d/%y" /> in <em><a href="<txp:site_url /><txp:section />/?c=<txp:category1 />"><txp:category1 title=1 /></a></em><txp:if_comments_allowed><txp:if_comments>, <txp:comments_invite class="comments-label" /><txp:else />, <a href="<txp:permlink />#comment" class="comments-label">no comments yet</a></txp:if_comments></txp:if_comments_allowed><txp:if_first_article><txp:else />, <a href="<txp:permlink />" class="full-article" title="Read the post">Read the post</a></txp:if_first_article></p>
<txp:if_first_article>
<txp:rss_auto_excerpt sentences="3" linktext="Read the rest" linkclass="full-article" />
</txp:if_first_article>
</div>
{Edited to add Textile’s bc. for better readability and straight quotes. – Uli}
Last edited by uli (2013-07-23 12:29:35)
Offline
Re: 'article_balloons' form; excerpts; if-than statement
this code :
<txp:if_first_article>
<txp:rss_auto_excerpt sentences=“3” linktext=“Read the rest” linkclass=“full-article” />
</txp:if_first_article>
you must change it to
<txp:rss_auto_excerpt sentences=“3” linktext=“Read the rest” linkclass=“full-article” />
but i need to see what your code looks like in your home page: <txp:article /> ?
corrected after uli noticed the mistake
Last edited by Dragondz (2013-07-23 13:18:57)
Offline
#3 2013-07-23 12:31:22
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: 'article_balloons' form; excerpts; if-than statement
Small adjustment: leave the closing </div>
:)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#4 2013-07-25 23:47:18
- Keepital
- Member
- Registered: 2013-07-11
- Posts: 13
Re: 'article_balloons' form; excerpts; if-than statement
Worked like a charm!
I have spent a couple days now researching on my own how to get rid of the “Read the Rest” link -I thought that if I could remove the link and the white space under each excerpt, then the page would be more aesthetic. I have not succeeded. It seems from other things I’ve read that all I would need to do to the above yellow block of code that I have is to remove the linktext=” “ but when I do that the link is still there and the title of the link changes to “Keep Reading…”
- I don’t understand where this is coming from. The words “Keep Reading…” do not appear in any of my forms. It almost seems like textpattern is hard-coded to display “Keep Reading…” when you use the excerpt box to write an article, or something. I don’t know how else it could be displaying those words when I remove the entire phrase from the code otherwise?? It’s completely baffling me.
If anyone is interested, browse to my page and you will see what I mean about the white space under each excerpt. http://www.keepitalltogethertips.com/ I think that if that white space was gone under each of the 3 excerpts, then I think all 3 bubbles would fit visibly into the upper portion of the screen without the view having to scroll. I could be wrong, but at least this is what I want to try.
In a second attempt to make the page more viewer-friendly, I tried playing around with if_last_article to get the last bubble to show no excerpt, and the first two with excerpts, that way it would shorten the whole thing up and still show an excerpt for at least the first 2 articles.
I’ve been playing with this over the last couple days and trying to do my own research on it so as not to have to rely on the TXP community so much in these early days of my blogsite.
Offline
Re: 'article_balloons' form; excerpts; if-than statement
Keepital wrote:
Worked like a charm!
I have spent a couple days now researching on my own how to get rid of the “Read the Rest” link -I thought that if I could remove the link and the white space under each excerpt, then the page would be more aesthetic. I have not succeeded. It seems from other things I’ve read that all I would need to do to the above yellow block of code that I have is to remove the linktext=” “ but when I do that the link is still there and the title of the link changes to “Keep Reading…”
Did you try <txp:rss_auto_excerpt sentences="3" linktext="" />
?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#6 2013-07-26 12:57:45
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: 'article_balloons' form; excerpts; if-than statement
colak wrote:
Did you try
<txp:rss_auto_excerpt sentences="3" linktext="" />
?
Either that or you change the default for linkwraptag (a p
) into a not so obtrusive linkwraptag="span"
so the link is diplayed on the same line as the last excerpt word.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline