Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2005-10-15 21:39:15

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Display category listing using "default" index.php page

This <code><br clear=“all” /></code> is new to me. I take it that is supposed to clear floats?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#17 2005-10-15 21:44:25

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Display category listing using "default" index.php page

Well you learn something new every day don’t you. Anyway I checked that tag out and it seems you don’t need the “” quotes around all.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#18 2005-10-15 21:49:42

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,421
Website GitHub Mastodon

Re: Display category listing using "default" index.php page

It does, although it’s deprecated. See the HTML documentation at w3.org. I’d rather go for <br style="clear:both;"> or for overflow: auto;.

Offline

#19 2005-10-15 22:23:08

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Display category listing using "default" index.php page

Yep I usually use style= or if it’s a recurring thing then do it in the CSS. Maybe set up a class for “hr”. I just haven’t seen “br” used like that before. :( And in the examples at w3.org they use the “” quotes. Mmmm.

Yazmin, what version of glx_if do you have?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#20 2005-10-16 00:43:22

ywickham
Member
Registered: 2005-06-11
Posts: 38
Website

Re: Display category listing using "default" index.php page

> wet wrote:

> You can use <txp:category title="1" /> to display a category’s title.

Thanks wet. I tried the tag that way and it doesn’t display the title at all. I ended up having to use txp:c title=“1”, but now the category name is lowercase instead of having the first letter capitalized.

> thebombsite wrote:

> This <code><br clear=“all” /></code> is new to me. I take it that is supposed to clear floats?

Yes, br clear=all is used to clear floats and is a deprecated element. (Just haven’t cleaned everything up yet.)

> thebombsite wrote:

> Yazmin, what version of glx_if do you have?

I am using version 0.6.4.

Last edited by ywickham (2005-10-16 00:53:07)

Offline

#21 2005-10-16 00:50:04

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Display category listing using "default" index.php page

I don’t think the “title” attribute was available for 4.0.1 if that’s what you use.

I can’t see why it won’t work for you but thankfully you have a different solution. :)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#22 2005-10-16 01:28:50

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Display category listing using "default" index.php page

> “I tried the tag that way and it doesn’t display the title at all… the category name is lowercase…”

That wouldn’t work because not all tags have the same parameters or abilities. <txp:c /> is not a true tag – which is why it is not in the manual – it merely returns the value of whatever is in the url variable. As an example, say someone tries to load up ?c=apples, but you don’t actually have a category with that name. <txp:c /> will still return “apples”.

> “I don’t think the ‘title’ attribute was available for 4.0.1 if that’s what you use.”

The title attribute was indeed available for 4.0.1, but there is no tag <txp:category />. There is <txp:category1 /> and <txp:category2 />. There’s also my plugin that fills in some of the gaps.

Offline

#23 2005-10-16 04:13:23

ywickham
Member
Registered: 2005-06-11
Posts: 38
Website

Re: Display category listing using "default" index.php page

> mary wrote:

> > “I tried the tag that way and it doesn’t display the title at all… the category name is lowercase…”

That wouldn’t work because not all tags have the same parameters or abilities. <txp:c /> is not a true tag – which is why it is not in the manual – it merely returns the value of whatever is in the url variable. As an example, say someone tries to load up ?c=apples, but you don’t actually have a category with that name. <txp:c /> will still return “apples”.

> “I don’t think the ‘title’ attribute was available for 4.0.1 if that’s what you use.”

The title attribute was indeed available for 4.0.1, but there is no tag <txp:category />. There is <txp:category1 /> and <txp:category2 />. There’s also my plugin that fills in some of the gaps.

Thanks for clarifying all that Mary. I appreciate it. I’ve just ended up installing your plug-in so that I can get the category to display the way I want it to.

As for the txp:else with the glx_if, I’ll just leave it as is. :)

Offline

#24 2005-10-16 06:44:35

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,421
Website GitHub Mastodon

Re: Display category listing using "default" index.php page

> mary wrote:
<blockquote>
The title attribute was indeed available for 4.0.1, but there is no tag <txp:category />.
</blockquote>

I beg to differ. At least in my (unmodified) version of taghandlers.php there is this function starting on line #1019:
<pre>
function category($atts) { global $pretext; extract(lAtts(array( ‘link’ => 0, ‘title’ => 0, ‘name’ => ‘’, ‘wraptag’ => ‘’, ‘section’ => @$pretext[‘s’], ),$atts));

if ($name) $cat = $name; else $cat = @$pretext[‘c’];
[…]
</pre>

This function receives parameters which are common among tag handling functions, so I suppose its ok to use this as a tag. And it displays the current or a named category’s name or title. BTDT.

//w&

Last edited by wet (2005-10-16 06:45:17)

Offline

#25 2005-10-16 16:37:08

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Display category listing using "default" index.php page

Just looking through the History file I don’t think the combination of <code><txp:category /></code> and the “title” attribute was available until both <code><txp:section /></code> and <code><txp:category /></code> were updated or at least, they didn’t work properly.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB