Author |
Message |
prekill
Worker


Joined: Oct 22, 2005
Posts: 201
|
Posted:
Wed May 16, 2007 8:05 am |
|
Hey guys,
I am trying to build my own theme.
for now I am doing quite good.
I am having this "small" problem:
I am trying to divide the homepage into 2 tables. (see picture)
as you can see in the image I reduced the news table (story_home.html) to 60% and now I want to insert blocks in the remaining 40% (blue empy square).
But I cant find this table anywhere. any ideas? thanks for the helpers! |
|
|
|
 |
fkelly
Former Moderator in Good Standing

Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY
|
Posted:
Wed May 16, 2007 10:00 am |
|
I don't think this is going to be so easy. Simply reducing the size of the story_home is not going to automatically give you another "block" or area to work in.
There's a certain regimentation in the way themes work. First they do the header area, then the left blocks, then the center, then (if appropriate) the right ones. The themes call the blocks() function in mainfile which looks in the blocks table in the database for which blocks are in the area they are responsible for (left, center, center down, or right). So, I'm not sure how you are going to create another area in your center block.
You could look at the theme Odyssey that was revised for RN2.10. In that theme the news articles are presented in two columns within the center block. I just don't recall the exact mechanism that was used but we made it compliant for 2.10. |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Wed May 16, 2007 5:51 pm |
|
I cannot recall off the top of my head which theme function calls blocks('left'), but I believe the themefooter() calls the blocks('right'). What I am wondering is if blocks('left') could actually be called in themefooter() before blocks('right') and you would just have to remember this when you assign a block to be "Left" vs. "Right".
Note: you would have to find where blocks('left') or blocks('l') is being called in theme.php right now, and remove that first before putting it into themefooter().
Disclaimer: I'm at work and do not have the themes in front of me so I cannot recall what opens the table and starts off the columns... hopefully it is themeheader(). |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
evaders99
Former Moderator in Good Standing

Joined: Apr 30, 2004
Posts: 3221
|
Posted:
Wed May 16, 2007 8:31 pm |
|
Yes, you can call blocks('left') and immediately call blocks('right') inside themefooter. It's something I've seen for various themes, it should work fine |
_________________ - Only registered users can see links on this board! Get registered or login! -
Need help? Only registered users can see links on this board! Get registered or login! |
|
|
 |
prekill

|
Posted:
Fri May 18, 2007 2:13 am |
|
I dont really understand what you want me to do.
you want me to call blocks('right') right after the blocks('left') this way I will have 2 raws of block one next to the other?
please expand instructions/way of act.
thank you! |
|
|
|
 |
montego

|
Posted:
Fri May 18, 2007 6:31 am |
|
prekill, you have already done so well with this theme, I think you have the skills to do this. Within your theme.php, just review the code for where blocks('left') - it is sometimes called as blocks('l') - is being called and remove it from there and then do as Evaders has said inside themefooter().
You will not learn unless you try.  |
|
|
|
 |
jaded
Theme Guru

Joined: Nov 01, 2003
Posts: 1006
|
Posted:
Fri May 18, 2007 8:25 am |
|
|
|
 |
prekill

|
Posted:
Fri May 18, 2007 1:47 pm |
|
jaded wow!! too complicated to me, maybe simplify it for me please? |
|
|
|
 |
prekill

|
Posted:
Sat May 19, 2007 2:57 am |
|
Umm I dont really want a row of blocks in this empty space,
Its more like center blocks. not right blocks.
any idea on how to call the center blocks to open in this empty space? |
|
|
|
 |
montego

|
Posted:
Sat May 19, 2007 9:41 am |
|
Quote: |
any idea on how to call the center blocks to open in this empty space?
|
You might want to check to see if MetOpen is still around and try out their HomePage module. Maybe it is more what you are looking for. |
|
|
|
 |
evaders99

|
Posted:
Sat May 19, 2007 11:09 pm |
|
Center blocks is only called for index.php - as long as your News page is the main module and story_home.html is the one setting the widths of that columns, the empty space should work for blocks('center')
Otherwise, I would suggest just using blocks('left').. there is really no difference except that left blocks would appear using modules.php as well |
|
|
|
 |
prekill

|
Posted:
Sun May 20, 2007 12:29 pm |
|
OK, I changed blocks(right) with block blocks(center) and it came up very good!
I have only one problem:
the block loads 2 times, 1 in the block culm and the other in the TD of the news. how to I cancel the load in the TD of the news?
thank you! |
|
|
|
 |
montego

|
Posted:
Sun May 20, 2007 5:18 pm |
|
Well, you were to use blocks('left') not blocks('right')... Based on your original graphic at the top, you weren't showing left blocks on the left of your main content, so that is why I recommended this approach. It looked to me like you wanted just to the right of your content the left blocks followed by the right blocks. If you follow what I suggested, you might be surprised at how well it works. |
|
|
|
 |
evaders99

|
Posted:
Sun May 20, 2007 8:34 pm |
|
You'd have to delete the extra call to blocks('center') in header.php |
|
|
|
 |
prekill

|
Posted:
Mon May 21, 2007 12:49 pm |
|
evaders99 thank you thank you thank you!!
thanks everybody, very helpfull - like always
one small problem:
I want to switch between the blocks(center) to the news module on home page.
I just can not find the table which control this.
any idea?  |
|
|
|
 |
evaders99

|
Posted:
Mon May 21, 2007 1:26 pm |
|
Arg then why didn't you just use blocks('left') ?
You'll need to call blocks('center') somewhere before the News content is generated, so most likely somehwhere in themeheader() |
|
|
|
 |
prekill

|
Posted:
Mon May 21, 2007 2:55 pm |
|
ummm.. lol
I didnt use it because the width of the block is not what I am looking for, look how nice the center block fits
umm thats strange, If I move blocks(center) to themeheader the blocks are not showing at all.
any clue? |
|
|
|
 |
prekill

|
Posted:
Mon May 28, 2007 7:14 am |
|
|
|
 |
prekill

|
Posted:
Tue May 29, 2007 1:26 pm |
|
progress here!
I succeeded in replacing the news and center block by adding echo "<table>"; into themeindex().
the only problem now is that the center blocks load every news, how can I disable those loads? and make it appear only once?
thank you very much for all the help!
 |
|
|
|
 |
|