Description Macros

First, is there any comprehensive docs for using macros in the description field?

Second, is something like this currently possible:

[[foreach attr item.previewSpecifics attLoop]]
[[if attr.value &&"Book Title"]]
[[if attr.value &&"Author"]]
[[endif]][[endforeach attLoop]]

[[title]] by [[author]]

This is just a basic example, I understand I can do this using 2 foreach loops. Basically I’m asking if it’s currently possible to assign variables that are in scope for the entire description?

You could create a procedure and then “call” it by inserting the call command into your item description, like this:

[[procedure bookTitleAndAuthorString]]

[[foreach attr item.previewSpecifics attLoop]]
	[[if"Book Title"]]
		<b>[[attr.value]]</b> by 
[[endforeach attLoop]]


[[call bookTitleAndAuthorString]]

I don’t think that sample code actually works as expected, but it’s not really the point. I was just giving a simple example. I guess the answer is that you can’t assign values to a variable using these macros, right?

Which is fine, I will just find another way to do what I need. I may be able to use the “call” macro in a different way to accomplish my task.

We are using the 20+ year old MiscMerge library in GarageSale (yes, GS is that old). Here is the official documentation, but I’m not sure everything is still working as documented in there:

There is a ‘set’ command documented, but I never used it. Not sure if it still works at all…

1 Like

Awesome, thank you! I’ll check it out for sure.

Just to close the loop on this. The “set” macro seems to work perfectly. Tested using the following simple example. The output was as expected.

[[set author="Stephen King"]]
[[set title="The Stand"]]

[[title]] by [[author]]

This opens up a ton of possibilities for my descriptions and helps to simplify the complexity. Thanks, as always, awesome support!


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