Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-04-02 04:22:24

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

How do you manage Txp sustainability?

Sometimes you have to move hosts, hand-over code or content to other people, upgrade your Txp install, deal with redesigns or functionality requests…

be interested to hear how people manage Txp sustainability

shifting a site onto a subdomain (for archiving purposes) last week, I appreciated that the great majority of links were not hand-coded… so a simple tip, but one worth repeating…

  • when linking to a section, use its tag! <txp:section name="portfolio" title=1 link=1 /> or <txp:section name="portfolio">Previous work</txp:section>
  • link articles internally by ID … <txp:permlink id="123" /> or <txp:permlink id="123">Strange things happen on a Friday night</txp:permlink>

other issues include plugins, remembering logins, dealing with spam from comments or contact forms, labelling & annotation conventions to assist with tracking forms & pages

Offline

#2 2007-04-02 04:31:54

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: How do you manage Txp sustainability?

I don’t do that much, other than linking with TXP tags and using txp:image and txp:article_image for images. For local installs, I link with <txp:site_url /> for headers, CSS, JS, etc. I always change those links to root-relative for live sites though.

Offline

#3 2007-04-02 04:55:13

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: How do you manage Txp sustainability?

sometimes image paths in the css need to be updated when moving sites… #body {background:#fff url(/images/2.jpg) no-repeat;} – can’t use a Txp tag there – or can u??

Offline

#4 2007-04-02 06:35:48

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: How do you manage Txp sustainability?

Whoops, I meant linking to the CSS file (<link href="<txp:site_url />lib/something.css" rel="stylesheet" type="text/css" />). I do keep the same directory structure, so the CSS can use a relative url() to the image:

index.php
files/
images/
lib/
	something.css
	something.js
	img/
		design_img.png
textpattern/

Then the CSS:

selector {
	background: url(img/design_img.png);
}

ako_cssParse allows you to use TXP tags in your CSS, but I prefer external css files instead of TXP-managed CSS.

Last edited by jm (2007-04-02 06:36:55)

Offline

#5 2008-04-15 18:01:17

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: How do you manage Txp sustainability?

I know I’m chiming in a year late, but this is an interesting topic. How do you handle links within the article body, using Textile? We often have “content editors” formatting the content who are not very technical, so I hesitate to confuse them with any TXP or HTML tags. They are familiar with Textile only.

Currently I just have them use root relative links, as in "here's a Textile'd link":/section/page-title

Offline

#6 2008-04-16 17:19:01

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

Re: How do you manage Txp sustainability?

> use root relative links

Good! better than absolute URLs what I do all the time.

The 1st tip from Nardo is really a good one but one has always to remember :(

Still, the tip is ‘old but gold’.


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

Offline

#7 2008-04-16 18:02:36

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: How do you manage Txp sustainability?

I agree, if you have the ability to configure your development and server environments to support root-relative links, root-relative URLs seem to be the easiest to manage.

In my mind the only reason to use absolute URLs would be if you are unable to set up such an environment. I was just curious if others have additional reasons that absolute URLs would be more suitable than root-relative URLs.

Offline

Board footer

Powered by FluxBB