Locate and edit content in Magento 1 block


HippySunshine

Senior Member
I am very new to Magento, so apologies for my lack of knowledge, and if this is super obvious.

I have an old Magento 1 site that someone else has built and I am trying to edit content that is on a particular page, called 'Trade'.
In the backend, I have found the page: CMS > PAGES > TRADE.

The 'CONTENT' tab has some of the pages content written in it, but not the part I want to edit.
The 'DESIGN' tab has the following code, which I believe is where the content I want to edit is located:

Code:
<reference name="content">
    <block type="core/template" name="boards" template="cms/trade.phtml" />
</reference>
I need to know where the above is pulling content from I guess?
When I remove this from the CMS, it removes the content I want to edit from the frontend, so this little nugget is the key... I just can't find the bloody door!

When I go to 'TRADE.PHTML' in my files, I have the following code:

HTML:
<?php
    $page = Mage::getSingleton('cms/page');
    $advanced_fields = Mage::helper('core')->jsonDecode($page->getAdvancedFields());
    $cms_fields = array();

    foreach($advanced_fields as $field){
    $name = $field['name'];
        $content = $field['content'];
        $cms_fields[$name] = $content;
    }

    $filter = new Mage_Widget_Model_Template_Filter();
?>

<div class="board">
    <?php if(isset($cms_fields['board_1'])){ ?>
        <div class="board_left board_inner">
            <?php echo $filter->filter($cms_fields['board_1']); ?>
        </div>
    <?php } ?>
    <?php if(isset($cms_fields['board_2'])){ ?>
        <div class="board_right board_inner">
            <?php echo $filter->filter($cms_fields['board_2']); ?>
        </div>
    <?php } ?>
</div>
I can not for the life of me figure out where to edit this little bit of content, and it's taking up way too much time.
A point in the right direction would be a great help, as I'm sure this is pretty simple and obvious to you Magento devs! Help a newbie out :)
 

fisicx

Active Member
Looks like it's getting the data from $advanced_fields

It then loops through the array to create the $cms_fields array then echos the filtered result as $cms_fields['board_1'] and $cms_fields['board_2']

This might be a better place to ask the question: https://community.magento.com/
 

HippySunshine

Senior Member
Yeah I get that bit, I just don't know where this is in the Admin area, I just need to change a simple line of text :confused:
Why is Magento so long winded and difficult? :X3:

Thanks, I'll give that forum a go.
 
Top