Variables in section/passage links?

Is it possible to use a variable in a link title? Something like:

[[@variable]]

Such that the above link would lead to different sections depending on the value of the variable "variable"?

I've been trying to use if-then to accomplish the same effect but am running into limitations of what can be displayed in the then clause.


Hello!

Try something like this;

    set("variable","CLICK ME!")
This is an example game.

[[{variable}]](THISLINK):



[[THISLINK]]:

It works!

Quick Squiffy Reference


Hi there K.V.!

I swear, this morning I couldn't get custom link text to work inside @replace or inside if-thens (I can't remember which)!

At any rate, of course [[{variable}]] works too. Awesome!


I think what I was trying to do that wasn't working was:

{if condition:{@replace label=text}}

But you can do this instead:

@replace label={if condition:text} 

I updated my reference doc to indicate @replace doesn't work inside if-then.

Did I link you to your own reference?

Whoops!

I recognized your web handle, but I didn't remember that the reference doc was yours. (At least you know someone is using it!)


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums