Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Developer Platform: What are passthrough? and .main-image? targeting?



hi there,

this isn't anything that going to change my website but am hoping to just better understand the code / templating.

can someone help explain to me what .passthrough and .main-image are targeting? i couldn't find it in the docs anywhere.

i understand it's checking something but i'm just confused what exactly it's checking. main-image is obvious, but I don't see main-image on the json, but i do see passthrough.

sorry if the question is super vague!

thanks!michellea newbie in squarespace

Edited by Paul2009
Link to post
  • Answers 2
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

2 answers to this question

Recommended Posts

  • 0

This is super vague and it’s difficult to understand what you are seeking to understand. Can you explain where you are viewing these classes and why you want to understand more about them? It will help us if you include a working link to the page on the website too.

Hi, I'm Paul, founder of SF Digital, a specialist company helping Squarespace users by building the features that Squarespace didn't include.
Explore our range of Squarespace Extensions, including the Wishlist, and Datepicker Extension or book a Squarespace Expert for 1:1 help. Note that links in my posts may be affiliate links.

Link to post
  • 0

Ahhh goodness you are right, that's so vague. I'm sorry! @Paul2009

i'm on the trial mode yet so i don't believe the website is live or i'd give the link.

I'm working in just the basic template and just trying to create an event collection and am putting together the event.list page and referencing the blog.list that the base template has. Below is the blog.list code i'm referencing.

 <article id="post-{id}" class="blog-list-item {@|item-classes}" data-item-id="{id}">
 <a href="{fullUrl}" class="main-image content-fill">
   <img {@|image-meta} />
<h1 class="title" data-content-field="title">
   <a href="{sourceUrl}" target="_blank">{title}</a>
   <a href="{fullUrl}">{title}</a>
{.if excerpt}
 <a class="link" href="{fullUrl}">Read More</a>

first question, on the 2nd line,**{.main-image?}***, this seems to me to be checking if the main image class is there and if so then posting the link. however, main-image is not a class within the blog items json. (am i phrasing this correct?)

my second question, on line 8, {.pass-through?}. this is a class within the blog items json, but I'm not sure what it's referencing.

i understand how to post / access the class for the image and the title from a blog or event, but i guess i'm more just trying to understand why these two things are part of the blog code. i'm not one to just copy and paste code and not understand it :)

anyways, hopefully i explained it a bit more clearly this time and if i didn't, well i'll keep trying.


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • Create New...