Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-11-21 21:56:30

Dufresne
Member
Registered: 2005-09-19
Posts: 22

Structuring my first TXP site

Hi all,

Having spent several hours trying to get my head around the concepts and filtering out old posts i think i’m making progress.

However, i’m still not convinced about the best way of structuring a fairly simple site which has mainly static content.

I’ve read the articles on producing static content but wondered whether any of you guys could give me some pointers on the methods you’d use for the example below:

I want the site to have 3 main sections with approximately 5 inner sections in each. Each of these inner sections will have static content which i understand is achieved through having a sticky article for each section – will i need a new section for each page?

Is there an easy way of managing all these articles? – if i have 40 articles i envisage it will be difficult to find and edit the right one

The only dynamic content within these sections are news and events. If i wanted to display these on the homepage would i use an article form to pull out however many articles i want to display?

The other thing that confuses me is how do i create dynamic navigation that applies an active style on the section/page i’m in? There seems to be several plugins but i’m not sure which will work with the latest Textpattern releases. Otherwise i’m going to have to hand code each section/page with active on the right li.

Sorry for all the questions – i’d be really grateful if anyone can give me any pointers, give me any links to suitable articles or any sample code.

Cheers,

Andy

Offline

#2 2005-11-21 22:14:42

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

Re: Structuring my first TXP site

set up a test install on your localhost, and follow maniqui’s article

try out that approach and see whether the functionality is what you want – you can also troubleshoot things like the css hooks on dynamically generated menus (maniqui’s approach seems to cater for active styles)

and here’s an earlier alternative approach that might help too

for your news on the front page, you could use article_custom, and call for any items in a specific section or category to be listed – one little tweak for events is to change the post date to the future (event date) and give the article_custom tag the attribute time=“any” – so that’s easy

re: editing 40 articles – it’s not too bad with that number!

Offline

#3 2005-11-21 22:15:25

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Structuring my first TXP site

hi Dufresne,

I want the site to have 3 main sections with approximately 5 inner sections in each. Each of these inner sections will have static content which i understand is achieved through having a sticky article for each section – will i need a new section for each page?

Actually, there is no way to have real subsections in TXP.
You are right when you say that the static content can be achieved by having sticky article.
Of course you can create as many sections as you want, but again, it’s not possible to have subsections, in the sense that is not possible to have URLs like:

“www.mysite.com/section/subsection/article-title”

At least, not out of the box. Maybe it’s possible using a plug-in of those that rewrite the URLs, but I have never tested them.

So, you can create sections, even you can hardcode your menus to make them seem that a section is a subsection of a section.
But I’m not sure that this is a comfortable solution, because you will need to hardcode, and you will still have urls like “www.mysite.com/section1/”

And then, when you enter to the “subsection” (just another main section), you will get: “www.mysite.com/subsection1/”

You wont have a URL (a real one, made from real sections) like: “www.mysite.com/section1/subsection1” (again, at least, not out of the box). But check the tutorial below, and you will achieve a similar result with sections and sticky articles that will look as subsections.

The other thing that confuses me is how do i create dynamic navigation that applies an active style on the section/page i’m in? There seems to be several plugins but i’m not sure which will work with the latest Textpattern releases. Otherwise i’m going to have to hand code each section/page with active on the right li.

I would suggest you to use rdt_dynamenus (great and powerful plug-in) and also take a look at this tutorial: static/dynamic site with dynamic two/three level nav .

Having spent several hours trying to get my head around the concepts and filtering out old posts i think i’m making progress.

As I usually say: you will soon here a “click” in your head, you will make a deep “insight” and you will see a new horizon of posibilites and you will have lot of fun (I hope).

Last edited by maniqui (2005-11-21 22:24:01)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#4 2005-11-21 22:19:43

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Structuring my first TXP site

Oh, thanks nardo.
As always, I type slow (well, not too slow) in english.
I was replying at the time you were posting…

Of course, I forgot to suggest the article Building an static website with Textpattern , written by Richard Tietjen, the author of the rdt_dynamenus plug-in.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#5 2005-11-21 22:27:38

Dufresne
Member
Registered: 2005-09-19
Posts: 22

Re: Structuring my first TXP site

Wow, thanks for the quick replies guys.

I’ll take a look at those links and articles and see how i get on.

Getting late here in the uk but i’ll give it a whirl tmw.

If anyone else has any thoughts please post them and i’ll try explore them all in one marathon ‘sesh’ tmw.

Thanks again.

Offline

Board footer

Powered by FluxBB