Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-08-17 20:37:44

stevieg_83
Member
From: Glasgow, UK
Registered: 2009-07-24
Posts: 14
Website

basic functionality I'm trying to get my head around

OK – so my homepage has a custom form which pulls in the latest article from my blog. I now want to link that article to the full article.

Now from what I’ve read in TXP Solutions, I want to place <txp:permlink /> as the target for my href. However, how does TXP know to go my blog article page and not go to my main blog page?

Thanks folks,
Steven

Offline

#2 2009-08-17 20:57:38

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,726
Website

Re: basic functionality I'm trying to get my head around

txp:permlink will always link to that particular respective article (an individual page). Which section that is in depends on what you have set in the section and category drop-downs in your article.

If you want to link to a particular section landing page (overview of articles), use <txp:section link="1" title="1" wraptag="p" name="archive" /> or <txp:section name="archive">My Archive</txp:section> (see txp:section in the textbook).


TXP Builders – finely-crafted code, design and txp

Offline

#3 2009-08-17 21:03:50

stevieg_83
Member
From: Glasgow, UK
Registered: 2009-07-24
Posts: 14
Website

Re: basic functionality I'm trying to get my head around

Hmm – that’s lost me a bit – sorry.

I’ve got

<txp:article_image thumbnail="0" />
    <h3>MY BLOG</h3>
<h4><txp:section link="1" title="1" name="article" /></h4>
<txp:excerpt />

which doesn’t do anything for me

Offline

#4 2009-08-18 05:59:47

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: basic functionality I'm trying to get my head around

You just need the permlink to link directly to the article. Like so:

<txp:article_image thumbnail="0" />
    <h3>MY BLOG</h3>
<h4><txp:permlink><txp:title /></txp:permlink></h4>
<txp:excerpt />

Offline

#5 2009-08-18 06:01:22

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: basic functionality I'm trying to get my head around

Assuming you have called the article like so:

<txp:article_custom section="blog" limit="1">
<txp:article_image thumbnail="0" />
    <h3>MY BLOG</h3>
<h4><txp:permlink><txp:title /></txp:permlink></h4>
<txp:excerpt />
</txp:article_custom>

Offline

#6 2009-08-18 06:02:16

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: basic functionality I'm trying to get my head around

Or use the form attribute instead of container tag:

<txp:article_custom form="your_form_name" section="blog" limit="1" />

Offline

#7 2009-08-18 07:18:50

stevieg_83
Member
From: Glasgow, UK
Registered: 2009-07-24
Posts: 14
Website

Re: basic functionality I'm trying to get my head around

what page would that take you to then? Would it take you to the blog summary (ie last 10 blog posts) or would it take you to the individual blog article?

This is where I’m getting confused.

Having read more in TXP Solutions, I’m not sure I can actually achieve what I’d like to. I think I’ve got my head around how my blog would work because I only need 1 blog page because both the blog and an individual article use the same page components.

However, my portfolio page is somewhat different. My portfolio page displays a list of projects in a particular format whereas the specific project page uses different markup and so linking that through won’t work.

Unless I’m way off? It’s this stage that always frustrates me learning a new system – not a slight on TXP, just how I understand logic.

Last edited by stevieg_83 (2009-08-18 09:11:46)

Offline

#8 2009-08-18 12:03:31

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: basic functionality I'm trying to get my head around

It would take you to the individual blog article. The latest one because we put a limit="1" on the call. If you have a dev page it would be easy to help you more.

Offline

#9 2009-08-18 21:03:09

nabrown78
Member
From: Northampton, MA, USA
Registered: 2006-10-04
Posts: 294
Website

Re: basic functionality I'm trying to get my head around

stevieg_83 – Don’t fear, whatever formatting you need/want for your portfolio can be accomplished with Textpattern. You can use different forms for articles in a list versus single articles. And as jstubbs noted, the <txp:permlink /> will always take you to that article’s individual page, not an article list.

Also very helpful, you can conditionally output markup based on whether you’re on an article list page or individual article page. Check out the Textbook’s articles on <txp:if_article_list> and <txp:if_individual_article>

Offline

#10 2009-08-18 21:37:58

stevieg_83
Member
From: Glasgow, UK
Registered: 2009-07-24
Posts: 14
Website

Re: basic functionality I'm trying to get my head around

I’ve got it working how I’d planned now…

http://digitalevangelist.net so far, still have much to do until it’s finished certainly but that’s probably the heaviest functionality out of the way. I suppose what would be good is working out how to show projects on http://digitalevangelist.net/portfolio based on the category they are in as just now those links don’t work.

I’m also trying to get Cufon working based on the section. I had it working but then added a conditional if section and it blew the pages apart.

I’m getting there though.

Offline

#11 2009-12-03 14:26:19

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: basic functionality I'm trying to get my head around

@Steven

  1. I think that for a beginner the easiest way to see how basic Textpattern features work is to study the default site delivered with TXP.
  2. The second most important thing is to check the txp:tag reference. I always have it at hand through my browser shortcut ‘txptag’.

Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

Board footer

Powered by FluxBB