simple_list_page: blog listing and sidebar are not children of the same parent

SOLVE
Highlighted
Occasional Contributor

Hey All,

It appears the Simple List Page / Blog/All is not respecting the structure of the blog content module and blog sidebar.


The template is laid out like this

the above works as expected on the blog listing page, however once you click into .blog/all the listings and the sidebar are no longer children of the same div, and the blog content module is .span12

 

I need halp. I am not smart.

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Regular Advisor

Check your blog listing template for a mismatched HTML element and if statement. The opening tag and ending tag both need to be inside or outside the if statement.

 

You've likely got something like:

 

{% if... %}

<div>
Content
{% endif %}
</div>

 

Or this:

 

<div>

{% if... %}

Content
<\div>
{% endif %}

 

In either case the opening or ending tag will not be rendered causing you layout to break.

 

Make sure they're either both outside.

<div>

{% if... %}

Content

{% endif %}

</div>

 

Or they're both inside:

 

{% if... %}

<div>

Content

<\div>

{% endif %}

This can be tricky to find when there are several nested HTML elements or if statements.

 

2 Replies 2
Regular Advisor

Check your blog listing template for a mismatched HTML element and if statement. The opening tag and ending tag both need to be inside or outside the if statement.

 

You've likely got something like:

 

{% if... %}

<div>
Content
{% endif %}
</div>

 

Or this:

 

<div>

{% if... %}

Content
<\div>
{% endif %}

 

In either case the opening or ending tag will not be rendered causing you layout to break.

 

Make sure they're either both outside.

<div>

{% if... %}

Content

{% endif %}

</div>

 

Or they're both inside:

 

{% if... %}

<div>

Content

<\div>

{% endif %}

This can be tricky to find when there are several nested HTML elements or if statements.

 

Occasional Contributor

this was exactly the issue, thank you very much!

Reply
0 Upvotes