I'm looking for a snippet that will use the CSS selector tool that reads a hyperlink title and pulls out a premade snippet of the same name. For example, the title will be 01.01 A Great Divide as a hyperlink, but I just need the text. I have a premade snippet response with the same title I want to put in a box response on the website. Overall, there are 30 different titles with 30 premade snippets with the same names. I'm trying to save clicks versus typing /101 and then /102.
Hi Michael,
Welcome to the community ![]()
You can definitely use the site selector for this. Though, since I don't know what page you want to use it on, I can't provide a snippet for you to use.
I would recommend giving the site selector a try and then combining it with the {if} command so that the relevant text appears depending on the title.
Let me know if you have any questions about how to implement this or if you'd like to get on a call to discuss it.
Maybe something like this?
{if: contains({site:url},"01.01")}{import:101}
{elseif: contains({site:url},"01.02")}{import:102}
{elseif: contains({site:url},"01.03")}{import:103}
{elseif: contains({site:url},"01.04")}{import:104}
{endif}
Exactly what I was thinking! Thanks Brad.
Thanks Dylan and Brad, I got it to work with the sample snippet!