Can we use listing fields in descriptions?

tl;dr: I’m trying to avoid a large-scale rework of my database by asking for a terrible (but simple?) fix.

Because I’ve been using GS since before there were User Properties in the inventory record, and for various other seemed-like-a-good-idea-at-the-time reasons, I keep my inventory location in a listing User Property.

[There are actually other reasons but they’re part of a “system” that sounds even worse]

In fact, I have no Inventory items at all. I only have been using Listing items for managing everything. It makes me feel bad and foolish… but it’s where I am.

Also, I use markdown in all my descriptions.

sooo…

If I understand correctly (not usually true), I cannot put a template tag in my markdown code. Even if I’m careful not to interfere with the markdown translation. For example {{shippingOptions.packagePounds}} will just be rendered as text in my actual template, because tags are not evaluated inside [[listingDescription]].

I checked with the previous example in a (non-edited) GS template, and the {{shippingOptions.packagePounds}} just renders as the plain string shippingOptions.packagePounds when I press CTRL-OPTION so I think this is right.

But if I edit my actual template to include [[shippingOptions.packagePounds]], then that information which is stored in the listing, not in the inventory, will be included. Is that true? I have not yet tested.

Anyway, here’s the ask: I am wondering if it is at all feasible to add [[listing.userProps.property_title]] to the possible tags. There might be other tags that would not cause recursive trouble, but I can see something like including [[listingDescription]] inside the listing description would perhaps be unwise.

I’m not quite sure if I’ve understood this correctly but if your request is to be able to combine a template placeholder like [[item.userProps.property_title]] with Markdown, then this should already work.

I just tested it with a user property called Color I created and the placeholder [[item.userProps.Color]] revealed just fine in Preview mode.

If I am on the wrong track here, perhaps you can show some of your code/template that you are using?

It was literally the middle of the night when it finally sank in to my tired brain that I should have used {{}} and pushed CRTL-OPT instead of typing [[]] when I was testing this out in Preview mode. I had read that part of the manual, but hadn’t tried to do it.

So this already does what I want: it inserts a user property from the listing.

For some reason I assumed item.userProps.X inserted from the inventory props only.

Thank you for once again already adding the functionality for me to do the weird thing.

Hmmm.

To clarify: Can I use markdown in a text snippet to be inserted in my description, using for example “{{textblocks.mysnippet}}”?

When I try this in Preview mode, it does not seem to process the markdown to HTML.

Using markdown in text snippets doesn’t seem to work right now, sorry.

1 Like

For the moment I can convert the boilerplate markdown I want to add into HTML, and include that, I think?

Is the problem that text snippets vs user properties are added differently, or that they are added after markdown description is converted to HTML?

Or (thinking out loud) that items placed by tags are cleaned up strings, and this removes the \n newlines and so on?

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.