Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2020-09-24 07:50:51

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,473
Website

Re: [revised aim] Glossary output with synonymous terms

Bloke wrote #326053:

Oooh, there’s a typo or something’s been hacked out of that page by mistake. Will fix.

Thank you for your explanation and example fix! The added inline comment there also helps clarify some of the why. The why explanations often being what are missing in tag examples, but which make a big difference to understanding them. Anyway, I understand a bit better now. It seems dreadfully plain as day, which is embarrassing. Probably another one of those situations I keep relearning over and over.

etc wrote #326055:

Sorry, the progenitor was busy climbing boulders before it rains :-)

Never let me (or anyone) interfere with climbing boulders, or anything else that does not involve sitting in front of a computer.

I was only venting frustration at myself for not being able to self-help. I have a lot more research and content editing to do that will keep me busy as you climb several mountains first.

jakob wrote #326059:

. . . is it used often in everyday language?

Sorry about that. I try to kick the older/odd term around now and then.

Certainly not used in French everyday, or in English as a second language. ;) But I’ve grown up hearing it a fair amount. I had not realized it was chiefly North American, actually, but that’s a symptom of being part of the sample population, I guess.

In expansion of what the OED says (just looking at that), which is correct, copacetic is usually used as an alternative to strings that would involve with or to associations; e.g., ‘more in line with’, ‘jives with’, ‘more harmonious with’, ‘compatible with/to’, ‘okay with’, etc. So in the OED sense, you could compare it with ‘everything is okay with’, or ‘everything is copacetic with/to a native solution’, etc.

Btw, I had learned the word spondulicks here in the forum some time back (h/t Bloke). That was a good one.

Last edited by Destry (2020-09-24 08:05:33)

Offline

#32 2020-09-24 09:11:20

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,473
Website

Re: [revised aim] Glossary output with synonymous terms

etc wrote #326055:

name="varname" attribute stores its output in <txp:variable name="varname" />.

Please bear with me as the moloko milk kicks in…

My mind wants to operate in page conciseness/cleanliness mode. If whatever defines a variable’s value in a containing tag can be put aside in a form (assuming that’s true) and called from there instead of bloating up the markup of a page template, how does that work? Like follows?

Form named form_with_variable:

<txp:if_variable name="varname"> . . . </txp:if_variable>

In page template:

. . .
<txp:hide>Here we want the form/variable value to be.</txp:hide>
<txp:output_form name="form_with_variable" />
. . .

And if that’s true, then <txp:etc_query name="varname"> . . . </txp:etc_query> is functionally the same as <txp:if_variable name="varname"> . . . </txp:if_variable>?

Last edited by Destry (2020-09-24 09:13:45)

Offline

#33 2020-09-24 09:33:54

etc
Developer
Registered: 2010-11-11
Posts: 3,934
Website

Re: [revised aim] Glossary output with synonymous terms

Destry wrote #326065:

If whatever defines a variable’s value in a containing tag can be put aside in a form (assuming that’s true) and called from there instead of bloating up the markup of a page template, how does that work?

You can set (with <txp:variable name="varname"> . . . </txp:variable>) or check (with <txp:if_variable name="varname"> . . . </txp:if_variable>) and output (with <txp:variable name="varname" />) a variable everywhere (form, article body, etc) provided it is already defined somewhere else.

And if that’s true, then <txp:etc_query name="varname"> . . . </txp:etc_query> is functionally the same as <txp:if_variable name="varname"> . . . </txp:if_variable>?

No, it’s rather

<txp:variable name="varname"><txp:etc_query> . . . </txp:etc_query></txp:variable>

Offline

#34 2020-09-24 09:37:24

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,473
Website

Re: [revised aim] Glossary output with synonymous terms

etc wrote #326058:

the stylesheet is already contained inside the second etc_query block.

Ok. That was how I initially read it. The more I stared at it, the more I doubted myself.

So just as it looks, then, an etc_query snippet.

Last edited by Destry (2020-09-24 09:55:12)

Offline

#35 2020-09-24 09:54:07

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,473
Website

Re: [revised aim] Glossary output with synonymous terms

etc wrote #326066:

. . . and output (with <txp:variable name="varname" />) a variable everywhere (form, article body, etc) provided it is already defined somewhere else.

Whoa. Let me put this in different terms to see if I follow… You’re saying if I have a miscellaneous form named varname that contains some variable value, I can call that in a page using <txp:variable name="varname" />? Textpattern will just magically know to find that form by the variable name?

Or was that an indirect way of saying variable values can not be called by forms?

Sorry, you must be pulling your hair out (if you have any left). I told you guys I have trouble grasping Txp variables. (Algebra, no problems.)

Offline

#36 2020-09-24 09:55:00

etc
Developer
Registered: 2010-11-11
Posts: 3,934
Website

Re: [revised aim] Glossary output with synonymous terms

Destry wrote #326067:

So just as it looks, then, and etc_query snippet.

Yep, you can simply copy/paste two code block of the example. Just make sure you have a custom field called synonyms; otherwise replace synonyms as appropriate in the first block.

Offline

#37 2020-09-24 10:02:41

etc
Developer
Registered: 2010-11-11
Posts: 3,934
Website

Re: [revised aim] Glossary output with synonymous terms

Destry wrote #326068:

You’re saying if I have a miscellaneous form named varname that contains some variable value, I can call that in a page using <txp:variable name="varname" />? Textpattern will just magically know to find that form by the variable name?

Or was that an indirect way of saying variable values can not be called by forms?

Nope, you call this form as usual, using <txp:output_form form="varname" /> or just <txp::varname />. What I meant is variables can be defined in one place (form or whatever) and used in another one.

Offline

#38 2020-09-24 10:09:30

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,473
Website

Re: [revised aim] Glossary output with synonymous terms

etc wrote #326070:

Nope, you call this form as usual . . . What I meant is variables can be defined in one place (form or whatever) and used in another one.

Ah. Okay. No new voodoo I wasn’t aware of, then. That helps, thanks.

Offline

#39 2020-09-24 11:03:15

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,473
Website

Re: [revised aim] Glossary output with synonymous terms

etc wrote #326069:

Just make sure you have a custom field called synonyms; otherwise replace synonyms as appropriate in the first block.

Yep. Thanks. I’m starting to see the convenience of using the Keywords field in this case, as I don’t imagine ever using tags (in the tag cloud sense) for this site, which is what I might have used Keywords for otherwise (or however smd_tags works). But I’ll ensure data="{{?keywords}}" if I do.

Offline

#40 2020-09-24 11:08:02

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,473
Website

Re: [revised aim] Glossary output with synonymous terms

It occurs to me that the Tags Reference index would benefit from something like this if it was ever recreated in Txp. (Not raising/suggesting that old chestnut again.)

Offline

Board footer

Powered by FluxBB