Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-08-19 23:04:16

tomic
New Member
Registered: 2009-08-19
Posts: 5

basic question: linking to articles

I apologize for the triviality of this question, but it does not appear to be in any FAQ or tutorial; I suspect it’s considered “obvious”.

I’ve installed, created DB, tweaked up css, read and understand Semantics, create sections and articles, but I simply cannot figure out how to link to an article.

My question is simple: having created a number of articles, how do I link to those articles from other articles.

As dumb as the question is, I can find not one single description of how it is done, no tutorial, FAQ, etc.

Offline

#2 2009-08-19 23:37:25

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: basic question: linking to articles

Yup! Feels like it should sit in the article tab like it does in the image tab for images, but it’s a plugin.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2009-08-20 00:02:59

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: basic question: linking to articles

The answer may vary depending on what you want to achieve:

1) link manually to an article from within the article body text
use textile this way:
"link text":http://www.yoursite/etc/etc (remember to change the url if you are moving your site from a local to a live environment)
or for a simpler approach try wet_quicklink

2) link to one or more articles automatically from outside the article body text, but still within an individual article page (i.e. in a sidebar menu)
in this case you can use the “article_custom” tag in your page template. It will automatically list (and link to) all articles from a particular section, or a certain category, or having a certain value in a certain custom field… or any combination of the above.

edit: Oops uli was faster

Last edited by redbot (2009-08-20 00:03:59)

Offline

#4 2009-08-20 00:30:25

tomic
New Member
Registered: 2009-08-19
Posts: 5

Re: basic question: linking to articles

I must be confused about some fundamentals here. I tripped over <txp:permlink id=“articlenumber”… which does pretty much what I want; but what I am trying to do is use textpattern as a site builder, with arbitrarily nested articles, not just a simplistic blog with a layer of Sections below home containing one level of articles.

Specifically, my test involves emulating (ideally, exactly mimicing the URL structure, but that may be impossible) of this page:

http://wps.com/AMC

It’s an “article” containing prose with embedded links to articles, and those articles contain sub-pages. I actually care less about page-layout/presentation specifics than site and content management (wps.com is very large, some 5000+ pages, it’s 16 years old).

Content-wise, the article-containing-links-and-photos is my required target; how I get there I am willing to compromise.

Is it really true that textpattern is de facto constrained to three semantic levels, home, section, article?

Offline

#5 2009-08-20 00:42:01

tomic
New Member
Registered: 2009-08-19
Posts: 5

Re: basic question: linking to articles

uli wrote:

Yup! Feels like it should sit in the article tab like it does in the image tab for images, but it’s a plugin.

OK, thanks!! that tells me a lot about intent! So linking to other articles is not a major design feetch… hmm…

wet_link seems great — but I have 4.0.8 installed, and after installing the plugins (which state ‘not earlier than 4.0.7’…), I don’t get the ‘insert links’ option on the write screen, and there’s no indication on what to do if it doesn’t work.

Maybe textpattern isn’t suitable for my sites, as what I really need is a lot of article linking!

Offline

#6 2009-08-20 01:59:34

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,454
Website GitHub

Re: basic question: linking to articles

tomic wrote:

It’s an “article” containing prose with embedded links to articles, and those articles contain sub-pages.

Well the “top level” page (AMC) could be built as an index page — in TXP it’s an Article List. You can (sort of) do something similar:

  1. Write each article separately
  2. Assign them all to the AMC Section
  3. Tag each article using Category1 as the headings (“AMC and Rambler stuff”, “How To’s”, etc)
  4. Write the prose you want to see on the list page in the article’s Excerpt (sort of — the embedded link to the article’s “self” might be awkward)
  5. Write the body text in the article’s Body
  6. Use <txp:article /> and/or <txp:article_custom /> to generate the page for you, categorised like it is on the original site
  7. Upload images and use gallery tags/plugins to show your pictures

During the writing of the body of each article if you want to link to another article you need to use one of the methods outlined by Uli/redbot. Or use txp:link_to_next/link_to_prev if they’re logically connected in sequence. You could, however, make extensive use of TXP’s Links tab to keep stacks of internal and external links there and call them inline when you need them. Or use jsoo’s comprehensive soo_multidoc plugin to chain articles into a connected set.

I actually care less about page-layout/presentation specifics than site and content management

I think you’ll have a rough time exactly mimicking such haphazard early ’90s web sites in any modern CMS. They tend to be all about categorising and sectioning stuff into logical groups so that visitors can find what they want. If you prefer tonnes of manual cross linkage among articles that are all in one ‘section’ (as they appear to be in the site you mentioned) you really are better off using the mentioned plugin or writing the site in raw HTML and taking the hit on broken links and difficult maintenance. A CMS probably won’t make your job much easier (I’ve not tried them all so I can’t say for certain).

Is it really true that textpattern is de facto constrained to three semantic levels, home, section, article?

Article list, Category and Author take it to 6 ‘things’ but essentially yes, they are the fundamental building blocks (if you discount Pages and Forms as being able to create semantic content).

As far as ‘constrained’ goes, I don’t know. I’ve never felt being able to present and manage information in an orderly web site is a constraint. But then I like sites that have a structure :-p

Last edited by Bloke (2009-08-20 02:04:37)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Online

Board footer

Powered by FluxBB