Creating Links To Other Virtual Posts
-
Hello
I’m struggling with creating links (which I think is due to incorrectly using a second loop, as I have no PHP or Front end coding knowledge.
I have been able to follow Chester’s tutorials and set up a series of virtual posts using my own air press data.
I have virtual list posts of:
– People
– Methods
– Publications
each of these being a different Airtable table.I have a virtual item posts for all records of:
– People
– Methods
– Publications
Each of these is populated from the Airtable rows within the tables.Within the people list I can output their methods using:
[apr_populate field="Methods" relatedTo="Methods"]
Then calling:
{{Methods|Name-Method}}
I can also get the same result calling:
[apr field="Methods|Name-Method" glue=', ']
But I can not find a way to generate a link within the people list virtual post to each method page virtual item post.
I have tried using a second apr loop, like this:
[apr_loop2 field="Methods"|Name-Method] <a href="https://www.website.com/{{record_id}}">[apr field="Methods|Name-Method" glue=', ']</a> [/apr_loop2]
This however has the following problems:
– For each person in the list it outputs all methods, rather than those associated with the person
– The methods are grouped according to the person they are linked to in Airtable, so rather than a link being generated to each virtual method post, one link is generated for each group of methods.As my coding knowledge is zero, it would be great if someone could point me in the right direction…
Thank you
Full page code is:
[apr_populate field="Methods" relatedTo="Methods"] [apr_loop] <div> <strong>{{Name}}</strong> [apr field='Picture|url' wrapper='<img src="%s" />'] <strong>Methods:</strong> [apr_loop2 field="Methods"|Name-Method] <a href="https://www.website.com/{{record_id}}">[apr field="Methods|Name-Method" glue=', ']</a> [/apr_loop2] {{MiniBio}} </div> [/apr_loop]
- The topic ‘Creating Links To Other Virtual Posts’ is closed to new replies.