Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2024-09-12 13:47:01

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,538
Website GitHub Twitter

file_download_link: class not recognised (corrected title)

Hi

I thinked that class is a global attribute, but it’s not working on file_download_link

txp 4.8.8

Cheers.

Last edited by Dragondz (2024-09-12 15:39:22)

Offline

#2 2024-09-12 14:06:36

etc
Developer
Registered: 2010-11-11
Posts: 5,219
Website GitHub

Re: file_download_link: class not recognised (corrected title)

Dragondz wrote #337830:

I thinked that css is a global attribute

What do you mean? It never was, and how would it act on every tag, anyway?

Offline

#3 2024-09-12 14:10:04

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,463
Website GitHub

Re: file_download_link: class not recognised (corrected title)

style is available as an attribute on many tags, isn’t it?


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

#4 2024-09-12 14:16:24

etc
Developer
Registered: 2010-11-11
Posts: 5,219
Website GitHub

Re: file_download_link: class not recognised (corrected title)

Here is a list of current (4.9-dev) globals:

labeltag, class, html_id, not, breakclass, breakform, wrapform, evaluate, escape, wraptag, break, breakby, label, trim, replace, default, limit, offset, sort, variable

Offline

#5 2024-09-12 14:31:52

etc
Developer
Registered: 2010-11-11
Posts: 5,219
Website GitHub

Re: file_download_link: class not recognised (corrected title)

Bloke wrote #337832:

style is available as an attribute on many tags, isn’t it?

It could be coupled with wraptag, indeed, but do we promote inline styles?

Offline

#6 2024-09-12 14:44:39

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,463
Website GitHub

Re: file_download_link: class not recognised (corrected title)

etc wrote #337835:

It could be coupled with wraptag, indeed, but do we promote inline styles?

It’s not something we advocate but I think the attribute is still there for legacy reasons.


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

#7 2024-09-12 15:38:12

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,538
Website GitHub Twitter

Re: file_download_link: class not recognised (corrected title)

Sorry i am talking about class !!

Offline

#8 2024-09-12 19:23:16

etc
Developer
Registered: 2010-11-11
Posts: 5,219
Website GitHub

Re: file_download_link: class not recognised (corrected title)

Yes, class is global, but only works with wraptag (global too). Seemingly, <txp:file_download_link /> has no own class attribute. We can add it if needed, but then it will supersede the global one. You should also be able to construct links manually here:

<a href="<txp:file_download_link />" class="myclass">link content</a>

Offline

Board footer

Powered by FluxBB