If Condition in Template Skin.

Showing 1-4 of 4 messages
If Condition in Template Skin. JeeShen Lee 1/25/11 11:54 PM
Hello,

I wanted to control the page width based on the PageType load but get
error trying to save these code.
        <b:template-skin>
            <b:if cond='data:blog.pageType != &quot;item&quot;'>
                <style type='text/css'>
                    <b:variable default='930px' name='content.width'
type='length' value='974px'/>
                    <b:variable default='0'
name='main.column.left.width' type='length' value='180px'/>
                    <b:variable default='360px'
name='main.column.right.width' type='length' value='180px'/>
                </style>
            </b:if>

            <b:if cond='data:blog.pageType ==
&quot;static_page&quot;'>
                <style type='text/css'>
                    <b:variable default='930px' name='content.width'
type='length' value='974px'/>
                    <b:variable default='0'
name='main.column.left.width' type='length' value='0px'/>
                    <b:variable default='360px'
name='main.column.right.width' type='length' value='0px'/>
                </style>
            </b:if>
        </b:template-skin>

Please help.

Regards,
Jeeshen Lee
Re: [bloggerDev] If Condition in Template Skin. gavenkoa 1/27/11 1:51 PM
On 2011-01-26 9:54, JeeShen Lee wrote:
> Hello,
>
> I wanted to control the page width based on the PageType load but get
> error trying to save these code.
>          <b:template-skin>
>              <b:if cond='data:blog.pageType !=&quot;item&quot;'>

>                  <style type='text/css'>
>                      <b:variable default='930px' name='content.width'
> type='length' value='974px'/>
>                      <b:variable default='0'
> name='main.column.left.width' type='length' value='180px'/>
>                      <b:variable default='360px'
> name='main.column.right.width' type='length' value='180px'/>
>                  </style>
>              </b:if>
>
>              <b:if cond='data:blog.pageType ==
> &quot;static_page&quot;'>
>                  <style type='text/css'>
>                      <b:variable default='930px' name='content.width'
> type='length' value='974px'/>
>                      <b:variable default='0'
> name='main.column.left.width' type='length' value='0px'/>
>                      <b:variable default='360px'
> name='main.column.right.width' type='length' value='0px'/>
>                  </style>
>              </b:if>
>          </b:template-skin>
>
> Please help.
>
I googling phrase:

   "b:variable" site:help.blogger.com

without ant match. I think

   <b:variable ...>

is not allowed in Blogger template.
But this can be undocumented syntax??

Also I googling about:

   "<b:template-skin>"

Some site have tips about using this tags,
but again I think is is not documented.

I just put

   <b:template-skin>
   </b:template-skin>

Into my template and blog page was come inaccessible
ever template successfully uploaded to Blogger.

How about place custom JavaScript and change CSS from it?
This allow change look and feel anywhere in template.

Or put such code directly after HEAD tag:

<head>
<style type="text/css">


   <b:if cond='data:blog.pageType != &quot;item&quot;'>
     h1 {border-width: 1; border: solid; text-align: center}

   </b:if>
   <b:if cond='data:blog.pageType == &quot;static_page&quot;'>
     ...
   </b:if>
</style>
...
</head><body>

--
Best regards!

Re: If Condition in Template Skin. JeeShen Lee 1/27/11 6:26 PM
Hello Oleksandr,

Yes, these code you suggested is what i'm have been trying to do but
did it in a wrong way. Thanks.
<style type="text/css">
   <b:if cond='data:blog.pageType != &quot;item&quot;'>
     h1 {border-width: 1; border: solid; text-align: center}
   </b:if>
   <b:if cond='data:blog.pageType == &quot;static_page&quot;'>
     ...
   </b:if>
</style>

Regards,
JeeShen Lee
Re: If Condition in Template Skin. Beben Koben 6/30/12 6:37 AM
 <b:template-skin>
dellete it
what for?
that for CSS tagging!!!