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

Can’t get poll to include on custom template I created. 
 
sonicspecialists
Jr. Member
 
Total Posts:  4
Joined:  2009-07-09
 

Hello, I am having trouble including the default poll in my template.  I have not been using the whole reference name thing, but hard-coding the locations of the blocks.

I want the poll to be in my rightColumn phtml file, so I nested it in that.

<block type="page/html" name="rightcolumn" as="rightcolumn" template="page/html/rightcolumn.phtml">

                <
block type="poll/activePoll" name="right.poll" as="rightPoll">
                    <
action method="setPollTemplate"><template>poll/active.phtml</template><type>poll</type></action>
                    <
action method="setPollTemplate"><template>poll/result.phtml</template><type>results</type></action>
                </
block>>

            </
block>

I then inlucded that in the rightcolumn.phtml file with:

<?php echo $this->getChildHtml('rightPoll'?>

This shows nothing—any ideas?

oh yeah—heres what poll.xml looks like...i changed “right” TO “rightcolumn” but I don’t think that matters since I am not using references.

<!-- Mage_Poll -->
        <
reference name="rightcolumn">
            <
block type="poll/activePoll" name="right.poll">
                <
action method="setPollTemplate"><template>poll/active.phtml</template><type>poll</type></action>
                <
action method="setPollTemplate"><template>poll/result.phtml</template><type>results</type></action>
            </
block>
        </
reference>

    </default>
 
Magento Community Magento Community
Magento Community
Magento Community
 
briandesp
Jr. Member
 
Total Posts:  18
Joined:  2012-05-11
 

Looking on how to do this as well.

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