lqdesignstudios Posted August 8, 2020 Share Posted August 8, 2020 Site URL: https://www.waynesboro.org/ Hi there! Client wants a similar click and load like this example: http://www.corpangelnetwork.org/#/Patients Where you click an image, and the content below it swaps out. Does anyone know if this is possible with some code? And what the code might be 😆 Please and thank you! Link to comment
rwp Posted August 8, 2020 Share Posted August 8, 2020 If you do each item in a section, javascript can be used to display the correct one Link to comment
paul2009 Posted August 8, 2020 Share Posted August 8, 2020 Hi Lesley As this is a Brine-family template, it has the Ajax-Loading feature, so there are a number of ways to achieve this. As rwp suggests above, you could create a single index page, with a section for the patient images and titles, followed by a section for the details of each patient. These sections could then be selectively hidden or shown in response to clicks on the top row of patient images. This approach requires some code, although it's very simple. The main downside is the page load time. When the page loads, all sections (and all their content) will be loaded, even if the visitor doesn't want to view the hidden patient stories. A no-code solution is to create several pages, each containing the top row of patient images, but each containing a single patient's details below. By hyperlinking the top row of images/titles to each of the patient detail pages., the content for the relevant section would then be loaded using Ajax. The downside is that if you ever want to change the top row, you'll need to edit it on each one of the pages. The solution that would be easiest for the client to update in the future is to add a blog collection and place each one of the patient's details in a post. The page could be built with a Grid Summary Block (linked to the blog) to automatically show the top row of patient photos and titles. Below this, a code block would be used to pull the content from the first post on initial loading. When a different patient image was clicked, the content from that blog post would then be pulled in to replace the previous content. I hope this helps. Paul Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional. Would you like your customers to be able to mark their favourite products in your Squarespace store? Link to comment
pottedplant77 Posted August 8, 2020 Share Posted August 8, 2020 Will Myers on youtube does a tutorial on how to add tabs to a single page that will display/hide specific blocks on a page. You could try that, and perhaps ask him how to include images to the buttons :) Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.