CMS Development

russelltnails
参加者

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

解決

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.

0 いいね!
1件の承認済みベストアンサー
ndwilliams3
解決策
キーアドバイザー

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

解決

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件の返信
ndwilliams3
解決策
キーアドバイザー

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

解決

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.

 

russelltnails
参加者

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

解決

this was exactly the issue, thank you very much!

0 いいね!