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

still confused with template logic
 
iblastoff
Sr. Member
 
Total Posts:  252
Joined:  2007-08-31
 

Ok..after going through the design guide and trying a few changes here and there, I always think “Ahh now I got it!” only to run into another wall where any built-up assurance of what I’m doing plummets again.

The design guide clearly states that you can approach the frontend in a logical manner..for example if you’re looking at changing something within the catalog area of a category page, you can generally head to the /catalog directory and head within the /category directory to edit view.phtml. Ok. I suppose that makes sense.

So I try to apply this logic and I want to change that 24/7 Support col_left_callout.jpg image (which by the way, in the default blank theme, its on the *right* side..not left?) so I figure i could approach it either via right_col.phtml. Ok so I open it up and I find that the only image it references is the “Back to School” col_right_callout.jpg image with this

<img src="<?=$this->getSkinUrl('images/media/col_right_callout.jpg')?>" width="195" alt="<?=$this->__('Keep your eyes open for our special Back to School items and save A LOT!')?>" style="display:block;" />

So its not there. I check out col_left_callout.phtml just for the hell of it and find this:

<img src="<?=$this->getSkinUrl($this->getImgSrc())?>" width="195" alt="<?=$this->__($this->getImgAlt())?>" style="display:block;" />

I’m confused as to why the first chunk of code seems to grab the image directly while the other references a class function to grab the image/alt tag (which i assume to be what im looking for:col_left_callout.jpg) from somewhere else? is there a reason i’m not aware of as to why its inconsistent like that?

Plus, I’m finally able to find the reference to the 24/7 Support col_left_callout.jpg image and to my complete surprise, its within catalog.xml? Huh? Why is it there?? I’m not understanding the logic of placement at all here.

 
Magento Community Magento Community
Magento Community
Magento Community
 
iblastoff
Sr. Member
 
Total Posts:  252
Joined:  2007-08-31
 

thanks minu. i understand the template system is there for maximum flexibility. i guess its kind of hard to follow initially when you think you understand whats going on and then all of a sudden don’t get what you *expect* to be the next step.

either way, i’ll keep on trucking with this. its actually kind of fun to figure out (albeit slowly)!

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