Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Lil help to newbie: Specifying block locations
 
epliXs
Jr. Member
 
Total Posts:  6
Joined:  2008-07-14
 

Hello!
Could you please, help me out with the specifying location for blocks on page.
I mean for example: position:absolute; top:419px; left:50%; z-index:3;
Could it be done throughout AdminPanel/CMS/ManagePages ? Or changes have to be made in script files? And if its possible i would really appreciate if u post the code, and if needed name files that have to be changes.
Thank You!

PS: Ive been searching thought website about it, but could find anything.

 
Magento Community Magento Community
Magento Community
Magento Community
 
epliXs
Jr. Member
 
Total Posts:  6
Joined:  2008-07-14
 

...ok…
I need to create 2 blocks under the header, that would be consist of an image and serve as a link to a category, those blocks have to have other images that would link to a specific product…
How can i do this?! Please help!

Here is a pic of structure i need:

Image Attachments
HomeModified.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
corbykissler
Member
 
Total Posts:  39
Joined:  2008-05-14
 

Hi -

I know how frustrating it is to not get answers - so let’s see if I can help.

The design guide has lots of stuff in it go back and read it one or two more times and follow the tutorials.

it sounds and looks like you need to modify the existing layout - copy the original magento file off so you have a backup.

You’ll need to create a new block area and then insert it into the layout.

Modifiy two files page.xml and the template you are changing.

Page.xml will just be the “declaration” of the block and the block type.  See the current blocks that are there for examples.

The template will reference the block from page.xml and handle where it’s going to be displayed.  Again, see the items that are there.  You’ll have to handle the layout in the template.

I know this is pretty brief, but should at least point you in the right direction.

Good luck!

 
Magento Community Magento Community
Magento Community
Magento Community
 
epliXs
Jr. Member
 
Total Posts:  6
Joined:  2008-07-14
 

Thank you!
But i still don’t get it.

You’ll need to create a new block area and then insert it into the layout.

Do you mean i have to create additional file with needed structure in (my situation?) template/page , and then insert block in page.xml that would link to that file?

Modifiy two files page.xml and the template you are changing.

Page.xml will just be the “declaration” of the block and the block type.  See the current blocks that are there for examples.

The template will reference the block from page.xml and handle where it’s going to be displayed.  Again, see the items that are there.  You’ll have to handle the layout in the template. 

I thought i understood what you were saying, but whatever i did it didn’t seems to be working.  sick
... Ive created phtml file in template/page/html/box1.phtml and block in page.xml:

<block type="page/html_box1" name="box1" as="box1"/>

And got nothing.

Then i opened template/page/2columns-right.phtml and added following:

<!-- [start] middle -->
        <
div class="middle-container">
                                    
                            <
div id="box1" class="box1">
                            <
style type="text/css">
                            .
box1
                            {
                            position
:relative
                            
left:-300px
                            
top:0px;
                            
}
                            
</style>
                            <
img src="http://www.website.com/skin/frontend/default/my_skin2/images/header_top_container_bg.jpg" width="110" height="90"/>
                            </
div id="box1" class="box1">
I got what i need - pic insertion under menu, but im having bad feeling about it… rolleyes  lol
 
Magento Community Magento Community
Magento Community
Magento Community
 
epliXs
Jr. Member
 
Total Posts:  6
Joined:  2008-07-14
 

any comments on that?
I would really appreciate any help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
epliXs
Jr. Member
 
Total Posts:  6
Joined:  2008-07-14
 
epliXs - 03 August 2008 01:47 PM

<!-- [start] middle -->
        <
div class="middle-container">
                                    
                            <
div id="box1" class="box1">
                            <
style type="text/css">
                            .
box1
                            {
                            position
:relative
                            
left:-300px
                            
top:0px;
                            
}
                            
</style>
                            <
img src="http://www.website.com/skin/frontend/default/my_skin2/images/header_top_container_bg.jpg" width="110" height="90"/>
                            </
div id="box1" class="box1">

Can i get an answer… is it right way to go or not?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top