Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何删除Blogger中除博客帖子以外的页面上的侧边栏?_Html_Css_Blogger_Blogspot - Fatal编程技术网

Html 如何删除Blogger中除博客帖子以外的页面上的侧边栏?

Html 如何删除Blogger中除博客帖子以外的页面上的侧边栏?,html,css,blogger,blogspot,Html,Css,Blogger,Blogspot,我从头开始创建一个博客主题,陷入了这样的境地:除了博客帖子(又称“项目”)之外,我需要删除所有其他页面的侧栏。我已经看到了所有关于这个的问题,但他们建议使用css。我只是想知道,有没有办法不在客户端加载侧边栏,而不是加载然后使其不可见 我一直试图使用的概念是 <html> <head></head> <body> <header></header> <b:if cond='data:blog.page

我从头开始创建一个博客主题,陷入了这样的境地:除了博客帖子(又称“项目”)之外,我需要删除所有其他页面的侧栏。我已经看到了所有关于这个的问题,但他们建议使用css。我只是想知道,有没有办法不在客户端加载侧边栏,而不是加载然后使其不可见

我一直试图使用的概念是

<html>
<head></head>
<body>
    <header></header>

    <b:if cond='data:blog.pageType == &quot;item&quot;'>
      &lt;main class=&#39;container item-wrapper&#39;&gt;
        &lt;div class=&#39;row&#39;&gt;
          &lt;section class=&#39;content-wrapper col col s9 m9 l9&#39;&gt;
    <b:else/>
    <b:if cond='data:blog.pageType != &quot;item&quot;'>
      &lt;main class=&#39;container&#39;&gt;
        &lt;div class=&#39;row&#39;&gt;
          &lt;section class=&#39;content-wrapper col col s12 m12 l12&#39;&gt;
    </b:if>
    </b:if>

          &lt;/section&gt;

    <b:if cond='data:blog.pageType == &quot;item&quot;'>
          <section class='content-wrapper col col s3 m3 l3'>
          </section>
    </b:if>
        &lt;/div&gt;
     &lt;/main&gt;

    <footer></footer>
</body>
</html>

主类=';集装箱项目包装';
div class=';第39排;
截面等级=';内容包装col s9 m9 l9和#39;
主类=';集装箱';
div class=';第39排;
截面等级=';内容包装列s12 m12 l12和39;
/部分
/div
/主要
问题是,这个if-else块似乎不起作用,我不知道为什么在浏览器中检查时会得到两个不同的块

其次,如果我尝试使用CSS/Javascript,我必须将内容包装大小从s9更改为s12。但这样做将是最后的选择

试试这个

<html>
<head></head>
<body>
    <header></header>

    <main expr:class='data:blog.pageType == &quot;item&quot; ? &quot;container item-wrapper&quot; : &quot;container&quot;'>
      <div class='row'>
        <section expr:class='data:blog.pageType == &quot;item&quot; ? &quot;content-wrapper col col s9 m9 l9&quot; : &quot;content-wrapper col col s12 m12 l12&quot;'></section>

        <b:if cond='data:blog.pageType == &quot;item&quot;'>
          <section class='content-wrapper col col s3 m3 l3'></section>
        </b:if>
      </div>
    </main>

    <footer></footer>
</body>
</html>