BeeCMS is a template based on Blogger.com pre-2010

Blogger.com has revamped the template handling early 2010. Since then, the newly introduced Blogger.com Template Designer has a lot of features which allow blog owners to easily and radically alter the design of their website.

DO NOT USE THE BEECMS TEMPLATE if you do want to use the great features Blogger.com Template Designer!!!
  1. Switching from "Featured" to "homeurl" filtered by a Label

    As described in a previous post, we want to have a "homepage" or "startpage" which lists only selected posts. 

    In our current version, we use the #featured functionality of Amanda's Nexus 5. We have modified it a little bit and removed all the text length limitations and therefore we have suppressed the "continue reading" link. But the layout limitations remain.

    We then have the If else hack, which basically says, if it's the "homeURL", then show the #featured section, else show main.

    It is of course possible to get rid of all the layout limitations - by using the normal "posts" call of blogger. And we found Blake Matheny's way to include labels as filters for the homeURL.

    So in this part we want to prepare BeeCMS code to be able to then integrate Blake's hack. 

    Revisiting the Nexus code we found that Amanda merged the Smashing Magazine suggestions with Blogger.com calls by introducing a new "if". Smashing's Enrique Ramirez suggest using the "ol" tag when listing the posts. 

    The blogger call for listing posts is however wrapped in a "Includable". in Nexus 5 Amanda simply used the default Blogger code by wrapping it in an if script, which basically says, if the page is not an "item", then use we use the default html code with an "ol"-tag, if it is a single post then use the normal div-tag.

    The only difference is that in the CSS the ol tag has a few definitions for margins, so for now we decided to simplify things.

    We just use the ol-tag whether it is the type "item" (or single post) or not.

    Once everything is ok, we'll try to integrate Blake's code.

    So here's the Nexus original code:

    <b:includable id='main' var='top'>
      <!-- posts -->

        <!-- <b:include data='top' name='status-message'/> -->
        <b:include data='posts' name='breadcrumb'/>

        <data:defaultAdStart/>

        <b:if cond='data:blog.pageType != &quot;item&quot;'>
        

        <ol class='hfeed' id='posts-list'>

        <b:loop values='data:posts' var='post'>
        <li><article class='hentry'>

          <b:include data='post' name='post'/>
          <b:if cond='data:blog.pageType == &quot;static_page&quot;'>
            <b:include data='post' name='comments'/>
          </b:if>
          <b:if cond='data:blog.pageType == &quot;item&quot;'>
          <section>
            <b:include data='post' name='comments'/>
          </section>
          </b:if>
          <b:if cond='data:post.includeAd'>
            <b:if cond='data:post.isFirstPost'>
              <data:defaultAdEnd/>
            <b:else/>
              <data:adEnd/>
            </b:if>
            <div class='inline-ad'>
              <data:adCode/>
            </div>
            <data:adStart/>
          </b:if>
          <b:if cond='data:post.trackLatency'>
            <data:post.latencyJs/>
          </b:if>
        </article></li>
        </b:loop>
        </ol>

    <b:else/>

    <div class='hfeed' id='posts-list-item'>

        <b:loop values='data:posts' var='post'>
        <article class='hentry'>

          <b:include data='post' name='post'/>
          <b:if cond='data:blog.pageType == &quot;static_page&quot;'>
            <b:include data='post' name='comments'/>
          </b:if>
          <b:if cond='data:blog.pageType == &quot;item&quot;'>
            <b:include data='post' name='comments'/>
          </b:if>
          <b:if cond='data:post.includeAd'>
            <b:if cond='data:post.isFirstPost'>
              <data:defaultAdEnd/>
            <b:else/>
              <data:adEnd/>
            </b:if>
            <div class='inline-ad'>
              <data:adCode/>
            </div>
            <data:adStart/>
          </b:if>
          <b:if cond='data:post.trackLatency'>
            <data:post.latencyJs/>
          </b:if>
        </article>
        </b:loop>

    </div>

    </b:if>

    And here is our new (old) replacement, whereby we simply always use the ol-tag:

    <b:includable id='main' var='top'>
      <!-- posts -->

        <!-- <b:include data='top' name='status-message'/> -->
        <b:include data='posts' name='breadcrumb'/>

        <data:defaultAdStart/>

       

        <ol class='hfeed' id='posts-list'>

        <b:loop values='data:posts' var='post'>
        <li><article class='hentry'>

          <b:include data='post' name='post'/>
          <b:if cond='data:blog.pageType == &quot;static_page&quot;'>
            <b:include data='post' name='comments'/>
          </b:if>
          <b:if cond='data:blog.pageType == &quot;item&quot;'>
          <section>
            <b:include data='post' name='comments'/>
          </section>
          </b:if>
          <b:if cond='data:post.includeAd'>
            <b:if cond='data:post.isFirstPost'>
              <data:defaultAdEnd/>
            <b:else/>
              <data:adEnd/>
            </b:if>
            <div class='inline-ad'>
              <data:adCode/>
            </div>
            <data:adStart/>
          </b:if>
          <b:if cond='data:post.trackLatency'>
            <data:post.latencyJs/>
          </b:if>
        </article></li>
        </b:loop>
        </ol>


        <data:adEnd/>
     
    We have subsequently removed all "posts-list-item" CSS declarations. the less declarations, the better :-)

    Now remains the last part, the merging with Blake's code... can't wait, but I have to :-( 

    Posted via email from BeeCMS