cancel
Showing results for 
Search instead for 
Did you mean: 

i was wondering how to add html in the existing php code

i was wondering how to add html in the existing php code

Hello All!

 

Im currently stuck on how to achieve ( I think for the most ones a very simple thing )

I want to add custom html code to the current magento files, I have added a screenshot below.

Any help really is appreciated

 

http://i68.tinypic.com/dnnedu.jpg

 

Regards

4 REPLIES

Re: i was wondering how to add html in the existing php code

@marcis You can create either static block Or CMS page for this then call that block / CMS page from your template file.

Call CMS page:

$page = Mage::getModel('cms/page')->load('<page name>','identifier');
 echo $page->getContent();
Static Block :

<?php echo $this->getLayout()->createBlock('cms/block') >setBlockId('<block_identifier>')->toHtml(); 
?> 

Cheers 

-
Magento Programmer | Was my answer helpful? You can accept it as a solution.

Re: i was wondering how to add html in the existing php code

Hi GMehta!

First of all thanks for your help!! The problem I have is when I add a custom cms block,
and put the code between here:


class="<?php if($_link->getIsFirst()): ?>first"CODEHERE"<?php endif;| ?><?php if ($_link->getIsLast()): ?>last"ORHERE"<?php endif; ?>

 

I see a image coming then, but the problem is for this 2 links then it takes the same image, I need to put a seperate one for both.

Regards!

Re: i was wondering how to add html in the existing php code

@marcis Not getting you, can you elaborate

-
Magento Programmer | Was my answer helpful? You can accept it as a solution.

Re: i was wondering how to add html in the existing php code

Hi GMetha!

 

Again thanks, for digging into it. Here a new screenshot from the thing I want to create, In element inspector I can achieve it, but not directly through magento HTML code. I have uploaded the whole code from the page that I think that does the action.

 

code
http://pastebin.com/BrRdjiZg


image

http://i63.tinypic.com/vec6f7.png

 

Regards