using a tv to display affiliate link, but would like to include the "affiliate id #" (which would be the same for all links) in the tv description field so that i can build my links dynamically so they include the affiliate id.
example:
string together [*affiliate_link*] + [*affiliate_link:description*]. the result would be:
domain.com?aid=12345
where domain.com is the tv value and aid=12345 is the description.
i don’t htink the second part exists but wondering if it’s possible. i realize the description is used for the manager but it would be great if i could make use of that as well.
any help or other suggestions would be appreciated.
I do not think you can do it using phx but I’m sure it works with a custom snippet.
1. create a new snippet makeAffUrl
2. get the TV for this document using the getTemplateVars or whatever you prefer.
-Get the description. On the previous step you should have access to the tmplvarid field
3. $myTv = tmplvarid (or just hardcoce the id)
4. select description from modx_site_tmplvars where id = $myTv <- this will give you the description
5. Using the TV value + description echo the result
great idea. i’ll head in that direction, i just didn’t want to recreate the wheel if it’s already in the system. i’ve done that before only to later find out there’s already built in functionality for what i’m trying to do.
i do appreciate the help.