Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-01-03 00:18:58
- sangalo
- Member
- Registered: 2006-12-21
- Posts: 11
list newest articles w/pictures only
i would like to list the newest articles on the front page but only the images related to the latest articles on the front of my website /// how do i accomplish that ?
Thanks
Offline
Re: list newest articles w/pictures only
Hi sangalo.
You can try this:
in your frontpage (default) template:
<txp:article form="justtheimage" />
Create an article form named justtheimage with this:
<txp:article_image />
Also, check this:
http://textbook.textpattern.net/wiki/index.php?title=Txp:article_image_/
Offline
#3 2007-01-03 01:12:33
- sangalo
- Member
- Registered: 2006-12-21
- Posts: 11
Re: list newest articles w/pictures only
i did that but no images showed up ….. What i want is to list the top 3 latest articles with the images on the front page and have them linked to the full article when user clicks on image they are taken to the article associated with the image….///
Am a new TXP user so bear with me….
Thanks !!
Offline
#4 2007-01-03 01:42:04
- sangalo
- Member
- Registered: 2006-12-21
- Posts: 11
Re: list newest articles w/pictures only
i got the plugin i was looking for….
Offline
#5 2007-05-26 05:42:27
- herrin.blue
- Member
- From: Sometimes around Scotland
- Registered: 2007-05-26
- Posts: 10
Re: list newest articles w/pictures only
maniqui wrote:
You can try this:
in your frontpage (default) template:
<txp:article form="justtheimage" />
Create an article form named justtheimage with this:
<txp:article_image />
Hi!
I’ve used this trick in my webpage and it works fine but it seems to give some problems: I have 3 columns, the first one contains a menu with the pictures linking to the articles (as per above code), a central default page for my posts and a third column with a search box.
When I make a search using the search box, it returns correctly the results in the default section AND AT THE SAME TIME it replaces the above code, replacing the pictures with the results of my search… how come?
Thanks
Offline
#6 2007-05-26 11:01:56
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: list newest articles w/pictures only
You probably have two article tags (in the first two columns). You can change the one in the first column to something like this:
<txp:if_search>
<!-- nothing here, or something completely different -->
<txp:else />
<txp:article form="justtheimage" />
</txp:if_search>
Offline
#7 2007-05-26 14:34:25
- herrin.blue
- Member
- From: Sometimes around Scotland
- Registered: 2007-05-26
- Posts: 10
Re: list newest articles w/pictures only
that’s what I have written:
<div id=“title”>
<txp:sitename /><br />
<a href=”<txp:link_to_home />” title=”<txp:sitename />”><txp:site_slogan /></a>
</div>
<txp:article form=“justtheimage”/>
<!— end #title —>
Normally it displays the article related image, but if I make a search, it displays only the results, while I want it to be a static menu…
Offline
#8 2007-05-26 18:15:23
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: list newest articles w/pictures only
The search uses the <txp:article />
tag, so if you have two of them, it will use both. You could replace the one you want to be static with <txp:article_custom />
, you’d have to specify the section and category though (txp:article_custom)
Offline
#9 2007-05-27 08:01:29
- herrin.blue
- Member
- From: Sometimes around Scotland
- Registered: 2007-05-26
- Posts: 10
Re: list newest articles w/pictures only
I don’t really get it… How can I achieve something like this: www.nordljus.co.uk?
I’d like to create a side menu with the article related image, linking to the article itself. is there a plugin or a tag I must use to achieve such a result?
Thanks!
Offline
#10 2007-05-27 14:09:21
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: list newest articles w/pictures only
You can do this without plugin.
On your page, in the left column:
<ul>
<txp:article form="justtheimage" />
</ul>
Form ‘justtheimage’:
<li>
<txp:permlink><txp:article_image thumbnail="1" /></txp:permlink>
</li>
To prevent this list from changing when you’re displaying search results, you can have the search use it’s own section. You’ll find instructions on how to achieve this in this article by zem.
Offline
#11 2007-05-28 15:10:02
- herrin.blue
- Member
- From: Sometimes around Scotland
- Registered: 2007-05-26
- Posts: 10
Re: list newest articles w/pictures only
Els wrote:
To prevent this list from changing when you’re displaying search results, you can have the search use it’s own section. You’ll find instructions on how to achieve this in this article by zem.
Thanks Els!
I’ve tried what you suggested but still when I click on the various categories on my menu, the result is the same: the gallery will be display only the images from that very same category…
Any other way to solve this problem?
Thanks!
Offline
#12 2007-05-28 19:55:05
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: list newest articles w/pictures only
Ah, I’m sorry, I didn’t understand you wanted it to be the same everywhere. The <txp:article />
tag is context sensitive, so it will display articles from the section/category currently viewed. Try changing to <txp:article_custom />
for your left column. If you only want to display article thumbnails from a certain section there, you’ll have to use the attribute section
.
Offline