Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2005-10-26 10:16:49

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

Re: glz_crumbs, simple breadcrumbs plugin

Yes maerso, you didn’t put glz_vars @ the top of that page where you are calling glz_crumbs.

I know that by spreading vars across multiple plug-ins I made matters more complicated, but imagine glz_vars more of a lib for all glz_ plugins.

With a suggestion for TXPs dev team that is “in the works”, glz_vars might become redundant & obsolete with glz_crumbs 0.4 ; ).

Offline

#14 2005-10-26 10:27:17

mearso
Member
From: Wales
Registered: 2004-03-25
Posts: 18
Website

Re: glz_crumbs, simple breadcrumbs plugin

Cool that works great.

Offline

#15 2005-10-26 10:35:29

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

Re: glz_crumbs, simple breadcrumbs plugin

grin

Offline

#16 2005-10-26 11:25:49

mearso
Member
From: Wales
Registered: 2004-03-25
Posts: 18
Website

Re: glz_crumbs, simple breadcrumbs plugin

I see that the plug-in defaults to messy URLs – which is fine for my purposes, but would adding clean URL support create problems?

Offline

#17 2005-10-26 11:47:34

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

Re: glz_crumbs, simple breadcrumbs plugin

The only “messy” bit is the ?c=. From my knowledge, TXP doesn’t have “clean” support for cats. Please correct me if I am wrong.

Offline

#18 2005-10-26 11:56:47

mearso
Member
From: Wales
Registered: 2004-03-25
Posts: 18
Website

Re: glz_crumbs, simple breadcrumbs plugin

I think if you use the sitename/category/categoryname then it works.

It displays a list of the articles in that category using the default template

I would show you on the site I’m working on, but it has to stay on site at the moment.

Offline

#19 2005-10-26 12:14:34

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

Re: glz_crumbs, simple breadcrumbs plugin

Yes mearso, you are right. However, I couldn’t get it to work with sitename/sectionname/category/categoryname or sitename/section/sectionname/category/categoryname. Besides, there will always be <strong>?pg=</strong> so true clean URLs are still not possible.

Last edited by gerhard (2005-11-04 16:39:05)

Offline

#20 2005-11-04 15:24:43

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

Re: glz_crumbs, simple breadcrumbs plugin

Nice plug-in.

What I like from glz_crumbs over the built-in txp:breadcrumb is that glz_crumbs dont escape HTML elements if there are HTML in the section/category title.
I mean, if you have a section title that is <code>About <strong>me</strong></code>, this plug-in will output the breadcrumb without escaping the “strong” tags. So, you will get a breadcrumb like this one, when in a section frontpage

<a href=”“>Site Name</a> > About <strong>me</strong>

But problems starts when you are at an individual article page, because of title attribute in A tags.
This plug-in will output something like this

In the source:
<code><a href=”“>Site name</a> > <a href=”“ title=“About <strong>me</strong>”>About <strong>me</strong></a> > Article title</code>

So, <code>title=“About <strong>me</strong>”</code> will break the breadcrumb.

Maybe it’s difficult to strip-out HTML elements from section/category title before including it in <code>title</code> attribute in <code><a></code> element.
Or maybe not, by simple merging some functions used in sab_striphtml plug-in . But wait: if you (gerhard) think about strip out HTML from section/category title, do it only for the <code>title</code> attribute in <code><a></code> and not for the all breadcrumb. (did i explain myself?).

But a simple option to turn-off title attribute for links in the breadcrumb will also be a valid (and maybe an easy) solution.

Thanks!

Last edited by maniqui (2005-11-04 15:25:55)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#21 2005-11-04 15:45:41

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

Re: glz_crumbs, simple breadcrumbs plugin

Meanwhile, for avoid “bad” values for title attribute in links, I have manually remove titles from the plug-in code.

And a tip for using glz_vars: when you put it at the very top of your page template, put it in the same line as your XML declaration, (if you are using one).

I mean, do this:
<code><txp:glz_vars /><txp:output_form form=“head” /></code>

and not this:
<code><txp:glz_vars />
<txp:output_form form=“head” /></code>

This second one will return the following warning:

“line 2 column 1 – Warning: removing whitespace preceding XML Declaration”

Edit: I see that isnt a requisite to put the glz_vars tag at the very very top of the page. You can use it between your DTD and your < head> tag.

BTW, I have to ask something about this: <blockquote>I know that by spreading vars across multiple plug-ins I made matters more complicated, but imagine glz_vars more of a lib for all glz_ plugins.</blockquote>

What exactly means that? Could it be “dangerous” (for other plug-ins) to spread vars with glz_vars?

Last edited by maniqui (2005-11-04 16:06:14)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#22 2006-01-09 17:33:58

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: glz_crumbs, simple breadcrumbs plugin

Can you make an option to show category 2 or not? Something like showcat2=“0” as well as showing the article title also like showarticle=“0”. I would like to be able to turn these off.

Offline

#23 2006-01-10 17:10:41

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

Re: glz_crumbs, simple breadcrumbs plugin

Long time no posts. Sorry guys, have been terribly busy. :sigh:

maniqui
I will have to find some time and go through your ideas. You have some interesting proposals.

Could it be “dangerous” (for other plug-ins) to spread vars with glz_vars?

No, not at all. Just that glz_vars is a set of global variables I find handy to use (e.g. $siteurl instead of $GLOBALS['siteurl'] etc.). If you want to use the variables defined in glz_vars for your plugins or even for the website (e.g. global $siteurl; print $siteurl;), you are more than welcome.

Once again, sorry for taking ages to reply.

tinyfly

glz_crumbs v 0.3.1 :wink:

Offline

#24 2006-01-10 17:16:26

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: glz_crumbs, simple breadcrumbs plugin

Excellent, Thanks

Offline

Board footer

Powered by FluxBB