ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Integrating LG Polls

March 13, 2009 1:58pm

Subscribe [4]
  • #1 / Mar 13, 2009 1:58pm

    rdh

    6 posts

    I have been an EE fan and owner for a long time…but in the terms of my experience in using and customizing, I am still a major newbie.  I would like to integrate LG Polls into my site.  I have a simple blog with a main column that displays the latest 7 posts to the blog.  I have installed LG Polls but am unsure how to make a poll and it’s results show up in the main column in chronological order with the rest of the posts.  I would like my polls to appear as if they are just ordinary posts.  I would like them to go away if they have or move to the archives if they are in post #8…assuming that I am set to only display 7 posts on the index page.

    What is involved and where do I need to read to learn the basics of what I am trying to accomplish?  I can make a poll display by editing the template and cutting and pasting sample code into the index template…but this is not totally what I am looking for.

    Suggestions?

    Thanks in advance.

  • #2 / Mar 15, 2009 7:36pm

    Arun S.

    792 posts

    Polls created by LG Polls are just regular weblog entries that hold specialized data.  The first thing I would do is create a new weblog just for polls and then configure properly (explained here).

    Next, in your template, add the polls weblog to your weblog= parameter in the mail weblog:entries loop.  After this, the polls should be showing up in the natural flow of your previous setup (or at least the title of the poll).

    From there, add the LG Polls specific code (available here) within the weblog:entries loop.  For good measure, I would surround the LG Polls specific code in a conditional to only render it if it’s needed.  Something like:

    {if weblog_short_name == "lg_polls"}
      This is a LG Poll.  Let's add the proper code.
    {/if}

    Of course, the weblog_short_name conditional would be changed to test against whatever you decide to name your Poll weblog.

    I hope that make sense.  Leevi has written some detailed and helpful documentation. If you haven’t already, you should give it a read.  Follow the example he gives to get a feel for the code and then work on integration.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases