Quantcast
Channel: Squarespace Answers - latest questions
Viewing all articles
Browse latest Browse all 21023

Can I create a statement for "if on a page inside of a folder, do this, else do that"?

$
0
0

I'm having trouble figuring this one out. I'm using Submenu (folder navigation) tags.

I need to display some markup in a sidebar, but make that markup go away when on a page in a subfolder.

The if statement I'm looking for would be something like "if on a normal page, do X, if on a subfolder's page, do Y but don't do X".

This is basically the code:

  {.section collection}
  <h3>{navigationTitle}</h3>
  {.end}

  <squarespace:folder-navigation template="subnavigation" />

My subnavigation has the same "navigation title" markup you see here, so what happens is I see double titles when we're on a subfolder's page.

So something like this is what I need:

{.if subfolder}       
 <squarespace:folder-navigation template="subnavigation" />
 {.or}
 {.section collection}
  <h3>{navigationTitle}</h3>
  {.end}
{.end}

Although I do understand that doesn't make sense because of how the subfolder works. The subfolder tag is has it's own "if" logic built-in to display...

Anyways, any suggestions would be great!


Viewing all articles
Browse latest Browse all 21023

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>