Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-02-01 11:22:52

datorhaexa
Member
From: Düsseldorf, Germany
Registered: 2005-05-23
Posts: 115
Website

Category as start page

Howdy!

Some serious problem I got myself in by building site navigation with the use of categories only (mainly because of the hieararchy). Now, problem is that I have one page (template) and TP just places as first page the latest article (in may case static content). Is there a way to make TP go to a specific category in the form of www.mysite.com/index.php?c=SomeCategory ?

Help really appreciated cause my pants are on fire!

Offline

#2 2006-02-01 11:51:15

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: Category as start page

I was looking into category nav last night and came up with:

<code>
<txp:if_section name=”“>
<txp:article status=“sticky” />
</txp:if_section>

<txp:if_category>
<txp:article />
</txp:if_category>
</code>

I made the home page a sticky article and didn’t asign a section or category to it. Now when you land on www.mysite.com the sticky is shown and the cat nav works as it should.

Offline

#3 2006-02-01 12:17:31

datorhaexa
Member
From: Düsseldorf, Germany
Registered: 2005-05-23
Posts: 115
Website

Re: Category as start page

I’m just a step away from this, but here the problem is with a flash navigation that needs the category name as a parameter. I came up with:

<code>
<txp:if_category name=”“>
<txp:kml_flashembed movie=”/flash/navi.swf” height=“116” width=“750” fvars=” cat = Lalala” wmode=“transparent” fversion=“7” useexpressinstall=“true” />
<txp:else />
<txp:kml_flashembed movie=”/flash/navi.swf” height=“116” width=“750” fvars=” cat = $c” wmode=“transparent” fversion=“7” useexpressinstall=“true” />
</txp:if_category>
</code>

But it refuses to work :-(

Last edited by datorhaexa (2006-02-01 12:31:07)

Offline

#4 2006-02-01 12:56:16

datorhaexa
Member
From: Düsseldorf, Germany
Registered: 2005-05-23
Posts: 115
Website

Re: Category as start page

Wrong logic. But now it works, so to the benefit of others that may use the Flash embed plugin, here we go:

<code>

<txp:if_category name=”“>
<txp:kml_flashembed movie=“flash/navigation.swf” height=“230” width=“750”
fvars=“cat=$c” wmode=“transparent” fversion=“7” alttext=“Header” useexpressinstall=“true” />
<txp:else />
<txp:kml_flashembed movie=“flash/navigation.swf” height=“230” width=“750”
fvars=“cat=MyCategory” wmode=“transparent” fversion=“7” alttext=“Header” useexpressinstall=“true” />
</txp:if_category>

</code>

Offline

Board footer

Powered by FluxBB