Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2007-12-19 10:32:11
- mlarino2
- Member
- Registered: 2007-07-12
- Posts: 30
page title problem.
Hi
I am trying to modify my page title, to show the name of the article that is beeing displayed, its an article list but limited to 1 article, so its only displaying the site name.
I tryed doing this:
-Creating a form called “title” with this inside:
<code>
<txp:title />
</code>
-And putting this on my default page:
<code>
<title>
<txp:page_title /> : <txp:article_custom form=“test” limit=“1” section=“article” />
</title>
</code>
But ofcourse, what I am getting is the title of the first article on all the pages, instead of having a different one on each page.
can someone help me?
Offline
Re: page title problem.
use the article id instead of limit attribute
Last edited by iblastoff (2007-12-19 10:44:22)
Offline
#3 2007-12-19 10:45:26
- mlarino2
- Member
- Registered: 2007-07-12
- Posts: 30
Re: page title problem.
Yes, but that wont display the title of the article in an article list.
only when a single article page is displayed.
What I am trying to make is display the title of the post that is displaying on an “article list” limited to 1.
Offline
#4 2007-12-19 11:00:57
- mlarino2
- Member
- Registered: 2007-07-12
- Posts: 30
Re: page title problem.
Article Id is for single article pages also…
take a look at this:
www.mlarino.com/web2
as you can see the article title is “Second Post & Image”
But the html title displayed on the page is “Manuel Larino”
clic on the permalink of the article title.
Now the page title is “Manuel Larino : Second Post & Image”
Because is graving the title of the article beeing displayed.
Thats what I want to do on my article list.
I tried everything, so its probably imposible….
Anyone has an idea?
Offline
Re: page title problem.
I tried everything, so its probably imposible…
No. These kind of things aren’t impossible, not for Textpattern as these are so called “usual business”. You just have little misstepped aproach. So, why not:
<txp:if_article_list><txp:article form="test" limit="1" /></txp:if_article_list>
As txp:article_custom
isn’t content/context sensitive, but txp:article
is. But I have something to ask. Why you use the article’s title at article list, and why not using the real single article or just name the sections title what you desire?
Cheers!
Offline
#6 2007-12-19 11:26:16
- mlarino2
- Member
- Registered: 2007-07-12
- Posts: 30
Re: page title problem.
Well…
If I use single articles the comments will be displayed right?
I am new to textpattern, so I dont know everything.
I will try what you suggested.
thanks
Offline
Re: page title problem.
If I use single articles the comments will be displayed right?
No. Because the txp:article
is inside txp:if_article_list
conditionals. Geez… as article list ain’t single article. If you show article list comments won’t show, and we don’t show that tag when we are on singular article. And if we want the title when we are showing the single article you could just use <txp:title />
. In example:
<txp:if_article_list><txp:article form="test" limit="1" /><txp:else /><txp:title /></txp:if_article_list>
Geez… and after all you could just turn automatic comment apending off, and use them “manually”. But it’s not needed, as we won’t need that txp:article
tag with single articles.
Cheers!
Offline
#8 2007-12-19 11:38:09
- mlarino2
- Member
- Registered: 2007-07-12
- Posts: 30
Re: page title problem.
Thanks Gocom!!! it works perfect now!
Cant believe it took me that long to understand…
Thanks!
Offline
Pages: 1