Click here to register.
      
Bazaar


     Web Design, Templates, and Themes > Can't get assets on page layout template Goto page «Previous Page   1 2    Next Page»

Can't get assets on page layout template

User dwittenberg
Date 10/2/2008 9:34 pm
Views 1663
Rating 0    Rate [
|
]
Previous · Next
User Message
dwittenberg

I created a new Page Layout for our site (converting from another tool), and I got the first row (2 assets) on the page fine, but there is a second row of 4 assets, but I've been going through all the code and cannot get more "gray boxes" on the layout template.  Anyone have a guide on how to really modify the layout templates?  The top row of just two was easy, as I started with a template that had just 2 assets, and I just changed the sizing to make them lineup right, but the second row I can't seem to figure out.  Help ?

 

--- (Edited on 10/2/2008 9:34 pm [GMT-0500] by dwittenberg) ---



Back to Top
Rate [
|
]
 
 
bartjol

I think that if you study the three over one page template(or for that matter, three over one), you should be able to work it out. Those have two rows and in one of them more then one content area.

Maybe you can even just cut one of the three out and paste it in the other (but be carefull)

--- (Edited on 10/3/2008 2:34 pm [GMT+0200] by bartjol) ---



Back to Top
Rate [
|
]
 
 
dwittenberg

That's actually what I was doing yesterday and couldn't seem to get it to work.  I was comparing the three over one and the one over three, but can't figure out how to get the new asset placeholders on the layout, nor can I figure out how to get multiple rows.

It would help if I understood the coding better too, but not sure where I can learn about that.  I'm guessing the books, but really need to get this site up in a short-time frame so probably can't get them here until later next week I'm guessing.

Thanks!

Dan

--- (Edited on 10/3/2008 10:36 am [GMT-0500] by dwittenberg) ---



Back to Top
Rate [
|
]
 
 
bernd

That's actually what I was doing yesterday and couldn't seem to get it to work.  I was comparing the three over one and the one over three, but can't figure out how to get the new asset placeholders on the layout, nor can I figure out how to get multiple rows.

Columns are usually created as floating <div>-elements. The floating behaviour is controlled via CSS. The structure of your template should probably look similar to this:

<div class="col1">...</div><div class="col2">...</div>

<div style="clear: both"></div>

<div class="col3">...</div><div class="col4">...</div class="col5"><div>...</div><div class="col6">...</div>

<div style="clear: both"></div>

In the stylesheet defined in the header section you need to add entries for every column. Each entry should at least contain the assignment "float: left;". In addition, you can control width, padding, margins and borders.

--
Klettern in Magdeburg
(http://www.klettern-md.de)

--- (Edited on 03.10.2008 17:46 [GMT+0200] by bernd) ---



Back to Top
Rate [
|
]
 
 
dwittenberg

Mine looks pretty close to that I think.  This should have 2 rows, 2 columns each.  Ideally I want 2 over 4, but if I can get 2 over 2 working I should be able to make the rest work.  This is the layout template:

<div><a name="id<tmpl_var assetId>" id="id<tmpl_var assetId>"></a></div>
<tmpl_if showAdmin>
   <p><tmpl_var controls></p>
</tmpl_if>

<!-- begin row 1 position 1 -->
<div class="col1"><div class="layoutColumnPadding">
   <tmpl_if showAdmin>
    <table border="0" id="position1" class="content">       
    <tbody>
   </tmpl_if>

        <tmpl_loop position1_loop>
            <tmpl_if showAdmin>
                <tr id="td<tmpl_var id>">
                <td><div id="td<tmpl_var id>_div" class="dragable<tmpl_if isUncommitted> uncommitted-asset</tmpl_if>">
            </tmpl_if>

            <div class="content"><tmpl_var dragger.icon><tmpl_var content></div>

            <tmpl_if showAdmin>
                </div></td>
                </tr>
            </tmpl_if>
        </tmpl_loop>

        <tmpl_if showAdmin>
            </tbody></table>
        </tmpl_if>
        </div>
</div></div>
<!-- end row 1 position 1 -->   

<!-- begin row 1 position 2 -->
<div class="col2"><div class="layoutColumnPadding">
   <tmpl_if showAdmin>
        <table border="0" id="position2" class="content"><tbody>
   </tmpl_if>

   <tmpl_loop position2_loop>
    <tmpl_if showAdmin>
       <tr id="td<tmpl_var id>"><td>
       <div id="td<tmpl_var id>_div" class="dragable<tmpl_if isUncommitted> uncommitted-asset</tmpl_if>">
    </tmpl_if>
       
    <div class="content">
       <tmpl_var dragger.icon>
       <tmpl_var content>
    </div>

    <tmpl_if showAdmin>
       </div>
       </td></tr>
    </tmpl_if>
   </tmpl_loop>

   <tmpl_if showAdmin>
    </tbody></table>
   </tmpl_if>
</div></div>
<!-- end row 1 position 2 -->

<div style="clear: both"></div>

<!-- begin row 2 position 3 -->
<div class="col3"><div class="layoutColumnPadding">      
    <tmpl_if showAdmin>
       <table border="0" id="position3" class="content"><tbody>
    </tmpl_if>

    <tmpl_loop position3_loop>
       <tmpl_if showAdmin>
         <tr id="td<tmpl_var id>"><td>
        <div id="td<tmpl_var id>_div" class="dragable<tmpl_if isUncommitted> uncommitted-asset</tmpl_if>">
       </tmpl_if>

       <div class="content">
          <tmpl_var dragger.icon>
          <tmpl_var content>
       </div>

       <tmpl_if showAdmin>
        </div>
           </td></tr>
       </tmpl_if>
    </tmpl_loop>

    <tmpl_if showAdmin>
       </tbody></table>
    </tmpl_if>
</div></div>
<!-- end row 2 position 3 -->   

<!-- begin row 2 position 4 -->
<div class="col4"><div class="layoutColumnPadding">      
    <tmpl_if showAdmin>
       <table border="0" id="position4" class="content"><tbody>
    </tmpl_if>

    <tmpl_loop position3_loop>
       <tmpl_if showAdmin>
         <tr id="td<tmpl_var id>"><td>
        <div id="td<tmpl_var id>_div" class="dragable<tmpl_if isUncommitted> uncommitted-asset</tmpl_if>">
       </tmpl_if>

       <div class="content">
          <tmpl_var dragger.icon>
          <tmpl_var content>
       </div>

       <tmpl_if showAdmin>
        </div>
           </td></tr>
       </tmpl_if>
    </tmpl_loop>

    <tmpl_if showAdmin>
       </tbody></table>
    </tmpl_if>
</div></div>
<!-- end position 4 -->   

<div style="clear: both"></div>

 


---- HEAD BLOCK --

<style type="text/css">
.col1 {
    float:left;
    margin-top:31px;
    width:670px;
}
.col2 {
    margin-top:31px;
    margin-left: 0px;
    width:270px;
    float:left;
}
.col3 {
    float:left;
}
.col4 {
    float:left;
}

</style>

 

any thoughts ?  Thanks!  My css coding isn't that good, so that doesn't help I know.

 

--- (Edited on 10/3/2008 11:24 am [GMT-0500] by dwittenberg) ---



Back to Top
Rate [
|
]
 
 
dwittenberg

I installed firebug extension for firefox, and after some tweaking, I think I got the columns now, so I wasn't as far off as I thought.  Now, the only problem I can't get is the "gray asset placeholders" to show up in the layout.  What exactly are those things called and any hints on how I get those to show up?

Thanks!

Dan

--- (Edited on 10/3/2008 11:50 am [GMT-0500] by dwittenberg) ---



Back to Top
Rate [
|
]
 
 
dwittenberg

Ok, I think I've narrowed this down to this part of the code:

<!-- @page { size: 8.5in 11in; margin: 0.79in } P { margin-bottom: 0.08in } -->

<tmpl_loop position6_loop>

 <tmpl_if showAdmin>

   <tr id="td<tmpl_var id>"><td>

   <div id="td<tmpl_var id>_div" class="dragable<tmpl_if isUncommitted> uncommitted-asset</tmpl_if>">

  </tmpl_if>

  <div class="content">

   <tmpl_var dragger.icon>

   <tmpl_var content>

  </div>

  <tmpl_if showAdmin>

     </div></td></tr>

  </tmpl_if>

</tmpl_loop>

But, for the life of me, I can't find details on what all this really means.  It seems that the <tmpl_var id> is the key, because of that is assigned to something else one of the other assets shows up in that place too (now I understand how shortcuts work!), but, doesn't help me get the placeholders there..

 

 

--- (Edited on 10/3/2008 12:07 pm [GMT-0500] by dwittenberg) ---



Back to Top
Rate [
|
]
 
 
bernd

I think, the placeholders are not there because you removed the following piece of code:

<tmpl_if showAdmin>
    <table><tr id="blank" class="hidden"><td><div><div class="empty">&nbsp;</div></div></td></tr></table>
            <tmpl_var dragger.init>
</tmpl_if>

In addition, there are two bugs in the template you sent:

1. There is one </div> to many in the code for the first column.

2. You are using the wrong loop for the fourth column.

And there may be a few more. But I think that this is what you want:

<div><a name="id<tmpl_var assetId>" id="id<tmpl_var assetId>"></a></div>

<tmpl_if showAdmin>
<p><tmpl_var controls></p>
</tmpl_if>

<tmpl_if displayTitle>
  <h2><tmpl_var title></h2>
</tmpl_if>

<tmpl_if description>
  <tmpl_var description>
</tmpl_if>

<!-- begin position 1 -->
<div class="col1"><div class="layoutColumnPadding">
<tmpl_if showAdmin>
    <table border="0" id="position1" class="content"><tbody>
</tmpl_if>

<tmpl_loop position1_loop>
    <tmpl_if showAdmin>
                <tr id="td<tmpl_var id>">
                    <td><div id="td<tmpl_var id>_div" class="dragable<tmpl_if isUncommitted> uncommitted-asset</tmpl_if>">
    </tmpl_if>

    <div class="content"><tmpl_var dragger.icon><tmpl_var content></div>

    <tmpl_if showAdmin>
                     </div></td>
                </tr>
    </tmpl_if>
</tmpl_loop>

<tmpl_if showAdmin>
            </tbody></table>
</tmpl_if>
</div></div>
<!-- end position 1 -->

<!-- begin position 2 -->
<div class="col2"><div class="layoutColumnPadding">
<tmpl_if showAdmin>
    <table border="0" id="position2" class="content"><tbody>
</tmpl_if>

<tmpl_loop position2_loop>
    <tmpl_if showAdmin>
                <tr id="td<tmpl_var id>">
                    <td><div id="td<tmpl_var id>_div" class="dragable<tmpl_if isUncommitted> uncommitted-asset</tmpl_if>">
    </tmpl_if>

    <div class="content"><tmpl_var dragger.icon><tmpl_var content></div>

    <tmpl_if showAdmin>
                     </div></td>
                </tr>
    </tmpl_if>
</tmpl_loop>

<tmpl_if showAdmin>
            </tbody></table>
</tmpl_if>
</div></div>
<!-- end position 2 -->

<div style="clear: both"></div>

<!-- begin position 3 -->
<div class="col3"><div class="layoutColumnPadding">
<tmpl_if showAdmin>
    <table border="0" id="position3" class="content"><tbody>
</tmpl_if>

<tmpl_loop position3_loop>
    <tmpl_if showAdmin>
                <tr id="td<tmpl_var id>">
                    <td><div id="td<tmpl_var id>_div" class="dragable<tmpl_if isUncommitted> uncommitted-asset</tmpl_if>">
    </tmpl_if>

    <div class="content"><tmpl_var dragger.icon><tmpl_var content></div>

    <tmpl_if showAdmin>
                     </div></td>
                </tr>
    </tmpl_if>
</tmpl_loop>

<tmpl_if showAdmin>
            </tbody></table>
</tmpl_if>
</div></div>
<!-- end position 3 -->

<!-- begin position 4 -->
<div class="col4"><div class="layoutColumnPadding">
<tmpl_if showAdmin>
    <table border="0" id="position4" class="content"><tbody>
</tmpl_if>

<tmpl_loop position4_loop>
    <tmpl_if showAdmin>
                <tr id="td<tmpl_var id>">
                    <td><div id="td<tmpl_var id>_div" class="dragable<tmpl_if isUncommitted> uncommitted-asset</tmpl_if>">
    </tmpl_if>

    <div class="content"><tmpl_var dragger.icon><tmpl_var content></div>

    <tmpl_if showAdmin>
                     </div></td>
                </tr>
    </tmpl_if>
</tmpl_loop>

<tmpl_if showAdmin>
            </tbody></table>
</tmpl_if>
</div></div>
<!-- end position 4 -->

<div style="clear: both"></div>

<tmpl_if showAdmin>
    <table><tr id="blank" class="hidden"><td><div><div class="empty">&nbsp;</div></div></td></tr></table>
            <tmpl_var dragger.init>
</tmpl_if>


-- CSS styles --

.col1 {
    float:left;
    width: 50%;
}
.col2 {
    float:left;
    max-width: 50%;
}
.col3 {
    float:left;
    width: 50%;
}
.col4 {
    float:left;
    max-width: 50%;

}

--
Klettern in Magdeburg
(http://www.klettern-md.de)

--- (Edited on 03.10.2008 19:23 [GMT+0200] by bernd) ---



Back to Top
Rate [
|
]
 
 
dwittenberg

Perfect info!  With firebug I was able to find the mistakes and extra div's and such, so all appears to be working now, thanks!

--- (Edited on 10/3/2008 2:22 pm [GMT-0500] by dwittenberg) ---



Back to Top
Rate [
|
]
 
 
dwittenberg

Ok, similar problem with my other template, for some reason this morning none of the placeholders are there, though the pages all still look ok, but I noticed when I added some new pages, the asset holders are gone.  I tried adding some of the code above and that didn't help, I even tried to take the one I have working fine and strip the extra columns and then it broke, so I think I'm missing something.  This is the code for one of the 2 columns on my simple pages:


<!-- begin position 1 -->
   <div class="col1">
    <div class="sideNavigation">
       <div class="layoutColumnPadding">
        <ul class="navigation">
        <tmpl_if showAdmin>
            <table border="0" id="position1" class="content"><tbody>
        </tmpl_if>

        <tmpl_loop position1_loop>
           <tmpl_if showAdmin>
               <tr id="td<tmpl_var id>"><td>
            <div id="td<tmpl_var id>_div" class="dragable<tmpl_if isUncommitted> uncommitted-asset</tmpl_if>">
           </tmpl_if>

           <div class="content">
            <tmpl_var dragger.icon>
            <tmpl_var content>
           </div>

           <tmpl_if showAdmin>
             </div></td>
            </tr>
           </tmpl_if>
        </tmpl_loop>

        <tmpl_if showAdmin>
            </tbody></table>
        </tmpl_if>
        </ul>
       </div>
    </div>
    </div>
<!-- end position 1 -->   

anything obviously long?

Thanks!

--- (Edited on 10/6/2008 12:06 pm [GMT-0500] by dwittenberg) ---



Back to Top
Rate [
|
]
 
 

Recent Discussions Color Key

Design:

Development:

Et Cetera:

Install/Upgrade:  

Smoketest:

Template Group:


Re: Site paid for by advertizing by Klaus - Fri @ 02:27am

Smoke Test for WebGUI (Stable) (2008-11-21) by botaction - Fri @ 12:37am

Re: Site paid for by advertizing by pwrightson - Thu @ 10:59am

Re: Site paid for by advertizing by JT - Thu @ 08:58am

Re: Regelmäßiger Termin für Usertreffen in der Rhein-Neckar-Region by Klaus - Thu @ 06:11am

Smoke Test for WebGUI (Stable) (2008-11-20) by botaction - Thu @ 12:00am

Smoke Test for SVN (2008-11-20) by botaction - Thu @ 12:00am

Re: Improving page layouts by fdillon - Wed @ 08:38pm

Re: Improving page layouts by knowmad - Wed @ 08:25pm

Re: Site paid for by advertizing by knowmad - Wed @ 08:07pm

Re: SSL Configuration? by knowmad - Wed @ 07:51pm

Re: The Death of the Collaboration System by preaction - Wed @ 07:39pm