Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-03-03 13:55:38

lister
Member
Registered: 2008-02-13
Posts: 76

getting to know textpattern for dummies...

Hello everyone, Ive been lingering around for a couple of weeks now looking into textpattern as a cms of choice. I see from examples online that textpattern is a great tool and would be good to use.

I am basically a web designer with little experience in php and databases, though I have been reading and watching various tutorials.

The learning curve for textpattern seems a little steep if you have no experience in cms, but I’m determined to carry on and grasp the concept.

Here is an example of a site which I built for some artists friends.
http://www.precociouscollective.com/

They were looking for a place to show a piece of work and small bio for upcoming exhibitions (current site needs updating). I would like to build this into a a content managed site which allows the artist to log on and upload there image and edit the bio if need be. So the idea behind the site is very basic to begin with.

The index page has a slightly different layout than the other pages. The gallery page has thumbnails which when clicked load an iframe page (with the artist image and content) using Thickbox 3.1 javascript plugin, though this pages layout could change using textpattern’s plugins.

I need to figure out how to edit the pages (at the moment static html pages) and prepare them for textpattern. What would be the best procedure? I have textpattern installed on my mac. Can I have more than one textpattern site running? At the moment the default site is loaded (My Site).

I know this question is a tall order, but with a working static website which needs to be converted into some dynamic content (all be it simple, ie no blog etc..) it may help me better understand textpattern.

If you could help in anyway, I would be really great full.
Thanks for your time.

rob

Offline

#2 2008-03-03 14:55:35

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: getting to know textpattern for dummies...

Rather than thinking of how to convert individual pages into TXP, I would think about how to convert the site as a whole to a CMS concept. In TXP the main organizational unit is the section, and three sections would be an obvious start: the home page gets its own section (called the “default” section in TXP), then add an Artists section and an Exhibitions section. This gives you an easy way to control the layout within each section.

Each section can have its own template (“page” in TXP), but it looks like you could easily use one template for the whole site, using some conditional statements to control, for example, what appears in the sidebar, or if the sidebar appears at all. Or you may find it makes more sense to use a different template for each section.

Actually converting the site is mainly a matter of setting up the pages (again, templates) and forms (basically snippets that help make the pages more modular and manageable). Once you have that set up, getting the actual content into TXP is easy.


Code is topiary

Offline

#3 2008-03-03 16:09:40

lister
Member
Registered: 2008-02-13
Posts: 76

Re: getting to know textpattern for dummies...

thanks for your reply..

is it possible to have more than two sites running locally? I mean I have the basic default site, My site etc.. Now I want to create a site for precocious (the above mentioned site) and start creating some page(s) and include the current css.

Offline

#4 2008-03-03 16:19:50

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

Re: getting to know textpattern for dummies...

Yes, your site would be quite straightforward to set up. J Soo’s already given you a brief run-down. Following on from what J Soo wrote:

Your page template can include the page code including header, menu, wrapper and footer. The bit in the centre is all that really changes. Here you can use <txp:if_section /> to tell it to fill the main content differently according to section. Create three txp-forms (presentation tab > forms) for the inner section:

  1. a simple form “full_width” as used on the front page,
  2. a form “column_sidebar” with the sidebar div (containing txp:excerpt) and main div (containing txp:body and txp:title if relevant). Then when you create the article, write the sidebar content in your excerpt field and the main content in the main area.
  3. a form “artwork_list” for the list of thumbnails and link to the full article with the artist/artwork (you’ll want to use txp:article_image thumb="1" here, see below).

For the default and exhibition sections you will want to use txp:article in conjunction with limit="1" and listform="...".

I would create a section “artists” and make each artist with their piece of artwork an article. Upload the images and thumbnails and enter the image ID into the “article image” box in the article. Then for the <txp:if_section name="artists"> part of your page template, you’ll want to use txp:article in conjunction with limit="18" (number of thumbs per page) and listform="artwork_list" and if you want a page per artist/artwork (advantage: is linkable, disadvantage: no longer thickbox) also form="...". You can either make another form for the artwork profile or re-use “column_sidebar” above. You could enter the artist info in the excerpt field (sidebar) and artwork info in the main field.

two sites:
if you’re using the standard mac in-built webserver, you’ll have to set up two databases and txp installations in sub-folders of your localhost. If you google for “virtual hosts” on the net, you can read up on assigning each installation a web address (e.g. www.precociouscollective.dev). If you’re savvy, you can manually change your webserver config files. Various solutions exist to automate the use of Virtual hosts such as MAMP Pro or Headdress. Both cost – I use MAMP Pro in conjunction with the MAMP webserver (first costs, second is free) and have a whole series of individual txp installations in development on my local machine, each with their own domainname.dev or local.domainname.tld address.


TXP Builders – finely-crafted code, design and txp

Offline

#5 2008-03-03 16:46:59

lister
Member
Registered: 2008-02-13
Posts: 76

Re: getting to know textpattern for dummies...

Thank you so much on helping us..

This will help me get started. I’ll look into setting up another virtual host. I did play around with this when I installed textpattern and created a virtual site (example.dev) by editing the httpd.conf in MAMP. Not sure if its easy just to create a new host within httpd.conf as well as the current example.dev.

(added)
<VirtualHost precociouscollective.dev>
ServerName precociouscollective.dev
DocumentRoot “/Users/robf/Sites/precociouscollective.dev”
</VirtualHost>

once again I really appreciate the fast help on these forums. I just need to get my head round txp forms and tags? i’ll get the host sorted then start adding the pages/forms etc..

rob

Offline

#6 2008-03-03 17:53:18

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: getting to know textpattern for dummies...

I haven’t done much with MAMP, but it should indeed be just that easy to add virtual hosts, and you should be able to add as many VirtualHost blocks as you like.

Note that you can also avoid the need for virtual hosts by using the <txp:site_url /> tag as the site root wherever you need to specify an internal URI. This is probably good practice anyway, because then the site becomes easily portable.


Code is topiary

Offline

Board footer

Powered by FluxBB