PDA

View Full Version : Using Textpattern


ktinkel
12-11-2005, 09:59 AM
Okay, Ian (and anyone else who knows). I am tearing my hair out trying to set up this dratted thing. You can look at the mess I have made (http://www.htides.com/txp/food).

Here is what I know I cannot figure out how to do:

Delete date and author name at top of an entry (must be in the Default, but haven’t found it).


Replace the links at left with my own (I know it has to do with those dratted popups but I cannot figure out which one nor how to enter the data as most are simply blank screens).


Use my own HTML code (I know I can fix the list item and other details with CSS changes, but not how to fix the <h2> at the top — unless I just leave the header blank and start in the main message window).


Delete the ornamental rule at the bottom (I can’t find it in the content page default).
What this frustrating exercise demonstrates most clearly to me is that all I really want is something that helps me organize my site. I can make pages just fine.

Steve Rindsberg
12-11-2005, 01:49 PM
Change:

<h3><a href="http://www.htides.com/txp/food/pane-cotto" title="Permanent link to this article"><h2>Pane cotto</h2></a> · 11 December 2005, 13:09 by Kathleen Tinkel</h3>

to:

<h3><a href="http://www.htides.com/txp/food/pane-cotto" title="Permanent link to this article">Pane cotto</a> · 11 December 2005, 13:09 by Kathleen Tinkel</h3>

maybe? But my guess is that you didn't put all the escaped <h2> stuff in there yourself? Or you typed it as text and the ... er ... what program are you doing this with? ... app decided you really meant that as text and not as markup. Oh wait. TextPattern is the app and not a feature.

Is there a template that supplies the headings?

ktinkel
12-11-2005, 03:38 PM
Change … Oh wait. TextPattern is the app and not a feature.

Is there a template that supplies the headings?You got it. Textpattern is a CMS, one that Ian champions (and I rather admire, conceptually, at least).

But there are few (or only lousy) docs, and I cannot figure out how to customize anything except the CSS.

Thus my cry for help. Ian promised to help, so I figured he would jump right in! <g>

Ian Petersen
12-11-2005, 09:39 PM
OKDelete date and author name at top of an entryYou want to edit the default article form (unless you've made your own): Admin > Presentation > Forms. The date is created by the <txp:posted /> tag and the author name is created by <txp:author />. Just delete those two lines from your default article form and save it.Replace the links at left with my own In your default page template you should see those links in the 'left' DIV somewhere. They may be generated by a form, directly by a textpattern tag (something like <txp:linklist />) or simply by manually entering the html for the links. I can't tell from the code how they are generated, but that doesn't matter. It's probably a <txp:linklist />. Any links you have defined in Admin > Content > Links will show up here. If you can't be bothered to create any Links just replace the linklist with some plain old fashioned HTML in the page template.those dratted popupsIf you mean the tag generator popup thingies then yes, I agree, they can be a bit irritating. You don't have to use them at all. I rarely do. I prefer to look up the syntax for a tag in the TextBook wiki and write the tag manually.Use my own HTML codeYou can use as much or as little of your own code as you want. I usually start a site by building the page the old-fashioned way in my favorite editor and some dummy content. Once I'm satisfied with the basic layout and CSS I copy the HTML into the default Textpattern page template (completely replace the whole template) and the CSS into TP's CSS editor. Then I upload any interface images, either via TP's image admin panel or simply by FTP. Once TP is is nicely serving my page I can begin to replace the various parts of my page with TP's features (article content, links, menus, forms etc.) how to fix the <h2> at the topThat should be in your default article form too. It probably looks something like: <h2><txp:permlink><txp:title /></txp:permlink></h2> which means the title you enter in the write tab will be an active link to the permanent address of the article formatted as an H2 header. Yoou don't need to enter the HTML in the article title itself.Delete the ornamental rule at the bottomThat's probably in your article form too.

Hope this helps a bit!

ktinkel
12-12-2005, 05:31 AM
Hope this helps a bit!I think so. It never occurred to me that I could simply replace those pages with my own. On the other hand, what I mostly want out of this is the automation that lurks in those pages.

The links at left are in a txp:linklist and it didn’t occur to me that I do those in the Links area — thought I was supposed to enter something in the popup. Now I will try the Links tab.

I did realize last night that the literal HTML came from using Textile; I turned that off last night and will try again, hoping that all my own html will be applied.

I will go rummage in the forms and templates some more. I got so frustrated yesterday that I could barely focus.

Thanks.

Ian Petersen
12-12-2005, 09:56 AM
It never occurred to me that I could simply replace those pages with my own. On the other hand, what I mostly want out of this is the automation that lurks in those pages.The page template for each TP section is simply bog standard xhtml. You build your pages however you like with regard to the actual html coding. Wherever you place a textpattern tag <txp:something /> Texpattern parses the template and will replace that tag with the 'something' defined by the tag. Many tags have an associated form where you can fine tune the output of the tag. Thus, the simplest TP page contains your lovingly hand coded html with the addition of a single <txp:article /> tag where you want your content to appear. The article tag will be replaced by a list of articles each of which is, in turn, defined by the article form. By adding attributes to the article tag you can control how many articles are shown at a time, what order they appear etc. Similarly, there are tags for linklists, menus, category lists, comments and powerful conditional tags that allow you add some simple logic to your pages: If this is true then do that ... But you are at liberty to use as much or as little 'automation' as you want. That, for me, is the whole beauty of Texpattern. It doesn't get in the way if you don't want it to.the literal HTML came from using Textile; I turned that off last night and will try againTextile is an aquired taste. It's useful for quickly formatting your article content - remember to use the preview tab on the write pane - especially for 'blog' type sites I think it's useful. For highly formatted or complicated article content it may be just as easy to write the html directly, but in general I'd leave it turned on.

Steve Rindsberg
12-12-2005, 12:05 PM
From Ian's description, it looks like you can think of this as a kind of merge printing. The template is your document, the <txt:thingies /> are your merge fields that tell the app where to slug in replacement data.

If it helps to think of it that way and has Ian's blessing, go forth and do so. Else, ignore me. <g>

ktinkel
12-12-2005, 01:18 PM
From Ian's description, it looks like you can think of this as a kind of merge printing. The template is your document, the <txt:thingies /> are your merge fields that tell the app where to slug in replacement data.Textpattern (http://www.textpattern.com/) is a Content Management System, so I suppose you can think of as a merge-data sort of thing. Except that it is PHP that controls all this, and my mind goes blank whenever I try to wrap it around PHP.

And the documentation consists of several varieties of open-source contributions (a FAQ, a forum, a Wiki), some of it dealing with older versions.

You can theoretically use it pretty much as-is, but then it is more blog-like than I want. Thus all my frustration. Most of the example sites are blogs, so I can’t even crib from them.

It is one of the most elegant mid-range CMS systems I have seen. (It wouldn’t satisfy Kelvyn, say — too much serious automation is missing.)

Kelvyn
12-12-2005, 01:28 PM
[/url]
It is one of the most elegant mid-range CMS systems I have seen. (It wouldn’t satisfy Kelvyn, say — too much serious automation is missing.)

Quite right! A CMS has to be easy to set up and use, although a knowledge of PHP and MySQL is an advantage when initially setting the site up. I did look at Textpattern for a blog, but use Wordpress (http://www.textpattern.com/) - even if it is so easy to use that it can get abused by the client (see [url]http://blog.protekdor.co.uk/ )

Although I now have "standardised" on Joomla! (http://www.joomla.org) I still look at other options from time to time.

ktinkel
12-12-2005, 01:44 PM
I did look at Textpattern for a blog, but use Wordpress (http://wordpress.org/) - even if it is so easy to use that it can get abused by the client …I looked at Wordpress before Textpattern. I want simple but not a blog, so think I have set myself up for frustration.

Although I now have "standardised" on Joomla! (http://www.joomla.org) …I wonder if that might not be easier to tame. At least I would be simplifying something like what I want rather than trying to twist something simple to my purposes.

I figure it is all good for the brain (well, not the frustration, but the figuring things out). :rolleyes:

Kelvyn
12-12-2005, 03:00 PM
I figure it is all good for the brain (well, not the frustration, but the figuring things out). :rolleyes:

I used to think like that, and have spent many hours taming a script and making it work for me, only to have big problems when a security issue was found and an update needed, or when something stopped working because of a PHP upgrade on the server or some page content for some reason caused problems.

Now I stick to well proven (and therefore popular) scripts for which I can write my own templates. Having said that I am working with the developer of a content editing script called SnippetMaster (http://www.snippetmaster.com) which allows site users to edit text and image content on pages without affecting other site areas. At least this tool will be proven to me - I have done the CSS for the editor.

Ian Petersen
12-12-2005, 08:51 PM
That's basically correct, but each <txt:thingy /> can have its own 'intelligence' that may produce different content dependent on context. <txt:thingies /> may be nested in other <txt:thingies /> or may call different <txt:thingies /> as well.

Ian Petersen
12-12-2005, 09:03 PM
mind goes blank whenever I try to wrap it around PHPThough Textpattern is written in PHP, you don't have to know or care anything about PHP to be able use TP. I certainly don't.Most of the example sites are blogs, so I can’t even crib from them.They may be blogs but they may still be useful to pick apart to see how they're done. The main difference between a blog and any other site is that the articles (content) have dates on them. Otherwise they have graphics, a menu and some content organised in sections like any other site.too much serious automation is missingSuch as?

Ian Petersen
12-12-2005, 09:32 PM
I wonder if that might not be easier to tameI have looked (admitedly cursorily) at both Joomla and Drupal and would say they are massively more complicated than Textpattern, not to mention overkill for the type of site you appear to be trying to make, but, I may well be wrong.

Can you define what do you want the CMS to do - and what you don't want it to do? What sort of thing are you aiming at? My understanding is that you want a simple, easy to manage site where you can post articles on food, cooking - perhaps a recipe or two - typography and design and your general musings on life, the universe and everything. Technically, you want it to be valid (x)html and reasonably accessible. You want full control of the look and function of the site, but don't want to be bothered with html nitty-gritty in the day to day (or month to month) production of content, e.g. writing articles. Is this categorisation far wrong? If not, then I still think Textpattern is the ideal tool for that kind of site ...

ktinkel
12-13-2005, 06:52 AM
… I am working with the developer of a content editing script called SnippetMaster (http://www.snippetmaster.com) which allows site users to edit text and image content on pages without affecting other site areas. That is very interesting. Good luck with it.

That editor looks better than this one (and miles better than the one in the CIS forums).

What I need is the inverse of that — a gadget that works with the site organization and updates links when changes are made in directories, new directories added, and so on.

ktinkel
12-13-2005, 07:27 AM
My understanding is that you want a simple, easy to manage site where you can post articles on food, cooking - perhaps a recipe or two - typography and design and your general musings on life, the universe and everything.Sort of. I actually want a typography site, a food site, and a general (books, writing) site. (I have also got a local political site, which is where Textpattern is loaded right now, but I doubt I will use it much or at all — and that one could easily be a blog, in fact; or a forum.)

Technically, you want it to be valid (x)html and reasonably accessible. You want full control of the look and function of the site, but don't want to be bothered with html nitty-gritty in the day to day (or month to month) production of content, e.g. writing articles. ...Not too far off. I have no objection at all to writing the HTML for articles, many of which are already typed anyway and just need coaxing into format.

What I want help with is what is outside the article: the links to other parts of the site, some way of providing an index or other sort of browsable list of articles that is updated without my having to change multiple pages. That sort of structural stuff.

What I (think I) like about Textpattern: The notion of a front page that lists recent articles that is updated automatically (or semi-automatically). The ability to assign keywords (txp categories, though more than 2 would be good) to articles. A way to keep things in order and up to date without my manual point-by-point intervention.

ktinkel
12-13-2005, 07:34 AM
[The example sites] may be blogs but they may still be useful to pick apart to see how they're done. The main difference between a blog and any other site is that the articles (content) have dates on them.And allow for comments, fundamentally organize by date, have lots of page junk (on the front page, anyway).

[too much serious automation is missing.] Such as?[/QUOTE]Kelvyn produces sites for all sorts of clients, and needs to be able to customize the functions at will. I cannot see that Textpattern is that easy to manipulate, nor how you could use it for a sales site.

Ian Petersen
12-13-2005, 10:15 AM
I actually want a typography site, a food site, and a general (books, writing) siteAh! I see. If they're completely distinct sites then you'd need three separate Textpattern installations. TP can't handle separate domains in a single installation, AFAIK.What I want help with is what is outside the article: the links to other parts of the site, some way of providing an index or other sort of browsable list of articles that is updated without my having to change multiple pages. That sort of structural stuff.That's exactly what TP is good at. The single HTML template you make can, with a handfull of the right <txp:thingies /> become X number of sections containg N number or articles all automatically linked with menus and article indexes with little or no manual intervention.

Ian Petersen
12-13-2005, 10:51 AM
And allow for comments, fundamentally organize by date, have lots of page junkWell, that's really a content issue. I was thinking more in terms of the structure, i.e. menus, sections, content areas, sidebars, search boxes, breadcrumbs etc. That's all pretty much the same whatever type of site it is. Blogs seem to have a tendency to put a lot of content into long scrollable pages rather than separating it out into discrete pages, but that's easily changed. For example a simple edit to the 'limit' attribute of TP's article tag can change your site from a single page containing fifty articles to fifty pages containing one article.I cannot see that Textpattern is that easy to manipulate, nor how you could use it for a sales site.I think TP is a lot more powerful than it seems on the surface. It has a few simple tags that can be combined almost any way and anywhere you like. There is also a growing list of plugins for more specialised things TP won't do out the box. It doesn't have any built in integration with any 'webshop' type tools, but I believe it's possible to integrate more or less any PHP based tool via a plugin. TP's main limitation currently is its lack of support for 'deep' sites, i.e. subsections. You can have articles in sections plus categories of articles orthoganal to sections and that's about it. You can't have Mysite > Widgets > Round > Blue > Striped for example. But subsections will no doubt appear in due course.

ktinkel
12-13-2005, 12:58 PM
If they're completely distinct sites then you'd need three separate Textpattern installations. TP can't handle separate domains in a single installation, AFAIK.Didn’t expect it to — I have one learning TP site right now. Once I know what I’m doing (if that isn’t too optimistic an expectation) figure I can then set it up elsewhere.

That's exactly what TP is good at. The single HTML template you make can, with a handfull of the right <txp:thingies /> become X number of sections containg N number or articles all automatically linked with menus and article indexes with little or no manual intervention.Okay. Guess I will keep plugging away at it. I get frustrated along the way and give up. (Textpattern is much harder to learn than CSS was!)

ktinkel
12-13-2005, 01:02 PM
I was thinking more in terms of the structure, i.e. menus, sections, content areas, sidebars, search boxes, breadcrumbs etc. That's all pretty much the same whatever type of site it is. Blogs seem to have a tendency to put a lot of content into long scrollable pages rather than separating it out into discrete pages, but that's easily changed. For example a simple edit to the 'limit' attribute of TP's article tag can change your site from a single page containing fifty articles to fifty pages containing one article.Thanks. That is useful to know.

I think TP is a lot more powerful than it seems on the surface. It has a few simple tags that can be combined almost any way and anywhere you like. … TP's main limitation currently is its lack of support for 'deep' sites, i.e. subsections. … But subsections will no doubt appear in due course.I probably don’t need that much complexity, but I have learned never to say never. Right now I just want a nice simple thing that works.

Steve Rindsberg
12-13-2005, 01:04 PM
>> I want simple but not a blog, so think I have set myself up for frustration.

When I port Friday to Mac, you'll be the first to know.

That'll be my first real TrueBasic project. Or was that my first true RealBasic project? One of those.

Tuits. Send tuits.

Steve Rindsberg
12-13-2005, 01:13 PM
>>That's basically correct, but each <txt:thingy /> can have its own 'intelligence' that may produce different content dependent on context. <txt:thingies /> may be nested in other <txt:thingies /> or may call different <txt:thingies /> as well.

That all makes sense (which probably has KT edging away from us here on the Group W Bench)

Friday does a few similar things. One of the cute tricks is that you can define your own thingies. Very handy for multiple sites that use the same template. You can set up thingies like product name, price, urls, pretty much any text you like, then have the app substitute "live" text for them when it makes html. Two or five or howevermany subsites can use the same template and stock content; specific details for each site get substituted when it makes html. Kinda handy once you get it under control.

ktinkel
12-13-2005, 04:43 PM
Friday does a few similar things. Okay, I’ll bite — what is, where is Friday?

Ian Petersen
12-13-2005, 09:33 PM
Didn’t expect it to [handle multiple sites]There are CMSs than can handle multiple sites, but I think they would be overkill for the sort of thing you are doing.Textpattern is much harder to learn than CSS was!I found the hardest concept to grasp is that there is no such thing as a 'page' anymore. There are templates that can generate a list of any number of 'articles', but the single static page is not really something that exists in the Texpattern scheme of things. TP is not particularly well suited to the common static commercial site of many a small to mid sized business. Typically with a picture of the factory on the front page, a page for 'products', 'our mission', 'contact us' and so on. Such sites rarely get updated so the work involved in setting it up TP is very much the same as building it manually by hand or in GoLive etc. It's not that such 'static' sites can't easily be done in TP, but there is little advantage to it other than getting all your content into a database.

TP comes into its own when the content is relatively dynamic, in other words updated often and where there is quite a lot of it to keep track of - which, of course, is where its 'blogginess' shows through.

TP is really a lot simpler than many other CMSs in that it only deals with content. Many CMSs have more or less complicated 'theme' or visual templating languages to fend with whereas TPs templates are standard html completely controlled by the author.

Ian Petersen
12-13-2005, 10:03 PM
Texpattern puts everything into an SQL database; templates, css, articles, urls, image links, file links etc. Wherever you put a <txp:something /> in the template TP will pluck the something or a list of somethings from the database and output it on the page. You can define your own <txp:mythingies /> from snippets of html combined with <txp:thingies /> and output them more or less anywhere you like, even inside other <txp:mythingies />. In other words fairly similar apparently to your Friday thing. It's really very simple and quite flexible.

Steve Rindsberg
12-14-2005, 04:35 PM
Friday? Oh, sorry. Thought I'd mentioned it before. It's the app I wrote and use to maintain all of my various Frequently Asked Questions sites and other similar ones. Friday, as in Joe "Just the FAQs, Ma'am" Friday.

It also has some handy features for newsgroup/email question answering.

But it only works on Windows PCs.

iamback
12-14-2005, 04:50 PM
Friday? Oh, sorry. (...) Friday, as in Joe "Just the FAQs, Ma'am" Friday. Huh? Is that referring to a person? If so, what person, and why?

And I think I still haven't sen a URL reference for it/him...

Steve Rindsberg
12-15-2005, 08:37 PM
http://www.snopes.com/radiotv/tv/dragnet.htm

I love it. According to this, Joe Friday never *said* "Just the facts, ma'am."

ktinkel
12-16-2005, 07:07 AM
Friday? Oh, sorry. Thought I'd mentioned it before. You probably did, but I didn’t remember. Great name, too.