Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2011-03-14 09:33:31
- Algaris
- Member
- From: England
- Registered: 2006-01-27
- Posts: 581
Using messy sections and categories
I’m working on a windows server for my latest project and I’m having some trouble figuring out how to use sections and categories together. Would the following code be the correct way to go about it?
<a href="<txp:site_url />?s=foo?c=bar">Hello World!</a>
Thanks.
Offline
Re: Using messy sections and categories
I think it s correct, but the only way to be sure is to test it ;)
Offline
#3 2011-03-14 09:52:43
- Algaris
- Member
- From: England
- Registered: 2006-01-27
- Posts: 581
Re: Using messy sections and categories
I keep getting 404 errors but that maybe in relation to other code I have in my page. I just wanted to get a quick second opinion.
—Edit—
I can get it to work fine when I use ?s=foo
or ?c=bar
but as soon as I combine them together to produce ?s=foo?c=bar
that’s when I stat getting for 404 errors
Last edited by Algaris (2011-03-14 10:01:29)
Offline
Re: Using messy sections and categories
how about:
<txp:category name="bar" section="foo">Hello World!</txp:category>
~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~
Offline
Re: Using messy sections and categories
Algaris wrote:
<a href="<txp:site_url />?s=foo?c=bar">Hello World!</a>
When combining attributes, separate them with ampersand.
<a href="<txp:site_url />?s=foo&c=bar">Hello World!</a>
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#6 2011-03-14 10:11:53
- Algaris
- Member
- From: England
- Registered: 2006-01-27
- Posts: 581
Re: Using messy sections and categories
Ah of course, thanks Stef. I’m guessing that I could use &
to avoid validation errors?
Offline
Re: Using messy sections and categories
ooh sorry i havent noticed the second “?” in the link!!
Offline
Re: Using messy sections and categories
Algaris wrote:
I’m guessing that I could use
&
to avoid validation errors?
Yep. Pesky standards :-)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#9 2011-03-14 21:41:24
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Using messy sections and categories
But why wouldn’t Kemie’s suggestion work?
Offline
Pages: 1