Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2006-04-23 11:12:25
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Renaming 'Category'.
lisionosk wrote:
I would like to display code snippets from my templates, but they won’t show: what is the way to have them displayed in my post ?
Could you be a bit more specific? What exactly is the code you have that won’t show?
Offline
#14 2006-04-23 11:19:19
- lisionosk
- Member
- From: Switzerland
- Registered: 2006-02-10
- Posts: 99
Re: Renaming 'Category'.
The relevant bits of html code and TXP tags in my default page and category form code.
Last edited by lisionosk (2006-04-23 11:20:22)
Offline
#15 2006-04-23 11:24:16
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Renaming 'Category'.
Ah, you mean here in the forum? Use < code > < /code > tags (without the spaces).
(How do I post tags and code on the forum?)
Offline
#16 2006-04-23 11:38:30
- lisionosk
- Member
- From: Switzerland
- Registered: 2006-02-10
- Posts: 99
Re: Renaming 'Category'.
Oh! So simple, thank you.
So, here I go.
In my default page template, I have tried to insert the code you had earlier indicated to me so that when a Category/Series link was activated, it would come into action, and when it wasn’t, only the static content would be displayed.
Here is the relevant part in the default page (See the whole template here):
<code><txp:if_category name=“Flowers-on-the wall”>
<txp:article form=“series_form” limit=“1” />
<txp:else />
<td id=“subnav”>
<div class=“subnavheader” style=“padding-left: 2px;”><h3>Urban photography</h3></div>
<div id=“sticky”>
<div id=“stickynote”>
<div class=“lney”>by L. Ney</div>
</div></div>
<div id=“cheat”> </div>
</td>
</txp:if_category></code>
This below being the form called ‘series_form’:
<code><td id=“subnav”>
<div class=“title”><txp:permlink><txp:title /></txp:permlink></div>
<div class=“description”><txp:body /></div>
<txp:category_list />
</div>
<div id=“cheat”> </div>
</td></code>
Now, trying to open a category page or an entry within a category I only always get the default static content.
What am I not doing right ?
Last edited by lisionosk (2006-04-23 11:40:05)
Offline
#17 2006-04-23 12:42:35
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Renaming 'Category'.
Have a look at this tag: <txp:if_category name="Flowers-on-the wall">
. There is a -
missing.
Offline
#18 2006-04-23 13:16:28
- lisionosk
- Member
- From: Switzerland
- Registered: 2006-02-10
- Posts: 99
Re: Renaming 'Category'.
Oh. It’s corrected now, but the result did not change. So, I again slightly altered this part:
<code><txp:if_category name=“Flowers-on-the-wall”>
<txp:article form=“series_form” section=“photolog” category=“Flowers-on-the-wall” limit=“1” /></code>
But a test entry within a category still shows the static content.
Offline
#19 2006-04-23 13:24:33
- lisionosk
- Member
- From: Switzerland
- Registered: 2006-02-10
- Posts: 99
Re: Renaming 'Category'.
Um, oh, so this, what is called the messy url works. I’m guessing then the change I made in the language file to have “category” renamed “series” never actually worked.
Offline
#20 2006-04-23 14:25:35
- lisionosk
- Member
- From: Switzerland
- Registered: 2006-02-10
- Posts: 99
Re: Renaming 'Category'.
I would like to have the previous and next article links (red arrows) on the series page to point only to articles within the same category, and also to use a slightly altered form for those. I’m really not sure all this is possible.
So, I think I should really just handcode all the pages myself, the old-fashioned way. Thanks for having looked into this, Els!
Offline
#21 2006-04-23 17:23:09
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Renaming 'Category'.
lisionosk wrote:
Um, oh, so this, what is called the messy url works. I’m guessing then the change I made in the language file to have “category” renamed “series” never actually worked.
This must be because you are displaying the category in it’s own section (photolog). I did not realize you wanted to do that. It works for me when displaying it in the ‘default’ section.
You also have in your tag Flowers with an uppercase F, while in the url it’s lowercase. That can make a difference too.
Offline
#22 2006-04-23 17:33:04
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Renaming 'Category'.
lisionosk wrote:
I would like to have the previous and next article links (red arrows) on the series page to point only to articles within the same category, and also to use a slightly altered form for those. I’m really not sure all this is possible.
Have a look at this plugin and read through the thread. Someone provided a mod so that you can browse within a category. I don’t use this one myself so I’m not sure if it will help you.
Offline
#23 2006-04-23 17:47:56
- lisionosk
- Member
- From: Switzerland
- Registered: 2006-02-10
- Posts: 99
Re: Renaming 'Category'.
Indeed! It worked after I replaced with an uppercase ‘f’ consistently everywhere. Well, thank you, really. I will continue on that road, then, and look into this plugin tonight.
:)
Offline