Using member uuid in Post to create dynamic llink

Hi

I’m using Ghost for simple posts since a while. Now I am facing a new challenge, tried to find an easy way but didn’t found the easy solution so far.

What I’m trying to do is to create a dynamic link in a post where I want to add the member uuid in the URL. I’ve seen that there exists the possibility to access the member attributes via Code Injection and javascript, but so far I wasn’t successfull to read and use the member parameters.

Can you please let me know how I should do it? Is there needed to create my own hbs template file? and how can i then access the parameter files in a post?

Sorry for may asking stupid questions… hope you can help me out here.

Thank you

If you edit a theme file (.hbs), you can access @member and @member.uuid. But if you’re wanting to have a link in the middle of the post change, then you’d need to do that with some javascript - at which point, you don’t really need to modify the theme. You could just put a request to get the member session (/members/api/member) into code injection, and the parse the result and use it to modify the link. No theme mod needed, just a little javascript. :slight_smile: