Post-preview doesn't work : it show the main page


#1

Hello,

I’ve a problem with a new template I’ve installed and modified (simplex news advance). It works fine but the post-preview doesn’t work. When I want to preview my article, It show me the main page and not the article page.

I don’t know how preview works…

How to fix it ?

Tanks !


#2

Not related with the template!!! Think so :open_mouth:


#3

If you true, how to explain It worked before the change of template ?


#4

can you see the posts correctly normally? so whenever you preview your page the url is of blogger not of your template but is of blogger servers


#5

I think I’ve found the problem (but not the solution !)

I watched the source code of the page, and saw the widget blog1 with the article inside was hidden.

#primaryTopWrapper, #secondaryContentWrapper and #mainPageSidebar are the elements of the homepage, #innerContent contain the articles (widget blog1).

   <style>
 <b:if cond='data:blog.url != data:blog.homepageUrl'>
 #primaryTopWrapper {
display:none;
visibility:hidden;
}
#secondaryContentWrapper {
display:none;
visibility:hidden;
}
#mainPageSidebar {
display:none;
visibility:hidden;
}
 </b:if>
 
 <b:if cond='data:blog.url == data:blog.homepageUrl'>
 #innerContent {
display:none;
visibility:hidden;
}
#narrowSidebar {
display:none;
visibility:hidden;
}

 </b:if>
 </style>

So the preview page “…blogspot.com/b/post-preview…” seem be consider like home page… An idea ?


#6

Sorry Can’t help in this matter let experienced users of blogspot like mohammad come :wink:


#7

I foud the solution :smile: : A preview page will have page type “item” but the URL is “homepageUrl”.

<style>
 <b:if cond='data:blog.url != data:blog.homepageUrl'>
 #primaryTopWrapper {
display:none;
visibility:hidden;
}
#secondaryContentWrapper {
display:none;
visibility:hidden;
}
#mainPageSidebar {
display:none;
visibility:hidden;
}
 </b:if>
 
 <b:if cond='data:blog.pageType == &quot;index&quot;'>
 #innerContent {
display:none;
visibility:hidden;
}
#narrowSidebar {
display:none;
visibility:hidden;
}
 </b:if>
 <b:if cond='data:blog.pageType == &quot;item&quot;'>
 #primaryTopWrapper {
display:none;
visibility:hidden;
}
#secondaryContentWrapper {
display:none;
visibility:hidden;
}
#mainPageSidebar {
display:none;
visibility:hidden;
} 
 </b:if> 
 </style>