Tell us what you are trying to do?
I have a view that loads various records with a shortcake that creates a Spotify playlist courtesy of your good selves. I want to open a page that loads the specific playlist for the record clicked on.
So I thin I need to add the unique record id to the page then the page load that specific record.
Is there any documentation that you are following?
No
Is there a similar example that we can see?
What is the link to your site?
darkersideofmusic.com
Hello Mike, and thank you for contacting Toolset support.
I have worked with you on the previous ticket, and I am sorry to tell, that I still do not understand what you want to achieve. I am a bit confused especially because you want to pass the parameters via url. Could you please elaborate a little more on your question so I can better understand it? Sometimes screenshots illustrating what you mean may go a long way to clarify what words fail to transmit, so if you like, make use of “upload an image” below the comment area.
I assume that you want to display a view of posts, and for each post have a link to open the Spotify playlist. Do you want it to open on a new page(browser page or tab) or do you want to use a popup that displays inside the same page? If you are looking to use a popup, I'll suggest using Bootstrap modals. You can load Bootstrap 3 or 4 from Toolset settings(Toolset->Settings->General(tab))
hidden link
Let me know more details about it(Page URLs, View, etc...).
Hi
Yes you are correct.
Instead of a popup Id like a button that once clicked goes to a new page that show the individual playlist and all the details of that submission.
This would be coming from the page with the records view that could have lets say 12 different records on there.
Does that make sense now?
Sorry im not great at explaining.
So
Page one is the view of all the records
each record has a button linking to the same age but with the record ID passed over
Page two then reads the passed id and loads that data.
I really hope thats clearer
My apologies if not
Thank you for the explanation, it makes sense to me.
We'll use the wpv-search-term shortcode to get the ID of the post, then we will pass it to a content template that contains the current shortcode(that we built for the Spotify iframe).
Check the view on this page, I built the URL by passing the ID to it hidden link
<a href="<em><u>hidden link</u></em>;">Listen for the playlist</a>
Then, check this content template, it only includes the shortcode to display the iframe hidden link
We used this content template inside the target page, by passing the playlist ID to it:
[wpv-post-body view_template="Playlist Spotify embed" item="[wpv-search-term param='playlist']"]
Read more about the 3 shortcodes that we used here https://toolset.com/documentation/programmer-reference/views/views-shortcodes/
Thank you that works a treat.
May I ask where did you place the code
[wpv-post-body view_template="Playlist Spotify embed" item="[wpv-search-term param='playlist']"]
As I cannot find it.
Thanks
Mike
Of course. I placed it inside the target page. This one hidden link