views:

12

answers:

1

Hi friends,

I'm a EE newbie.

I have the code below. the poll weblog displays at search result page, but doesn't display at blog and post details page :/ what am I missing?

display at search result page: www.blabla.com/search/noresults/d8ee432f229715a4adfbe1cc0d21049a/

NO display at blog pages: www.blabla.com/blog/ or www.blabla.com/blog/post/lorem_ipsum_is_simply_dummy_text/

Appreciate helps!!!! Thanks a lot!

{exp:weblog:entries weblog="lg_polls"}
  {exp:lg_polls:poll entry_id="29" precision="1" return="/blog/"}
   <p>{poll_question}</p>
    {if can_vote}
      {poll_form}
        {if has_voted}<p>You have already voted in this poll, however you can vote again.</p>{/if}
        <ul class='lg-polls-answers'>
          {poll_answers}
          <li class='a-{answer_count}'> 
            <label for='lg-polls-answer-{answer_id}'>{answer_input} <span class='answer'>{answer}</span></label>
          </li>
          {/poll_answers}
        </ul>
        <div class="alignCenter"><input type="image" src="{site_url}/images/btn_submitpoll.png" alt="Vote" /></div>
      {/poll_form}
    {if:else}
      {if has_voted}<p>Thanks for voting in this poll.</p>{/if}
      {if restricted}<p>Sorry, You are restricted from voting in this poll.</p>{/if}
      {if expired}<p>This poll ended on {expiration_date}.</p>{/if}
      {if yet_to_begin}<p>This poll is yet to begin. Voting opens on {entry_date}.</p>{/if}
    {/if}
    {if show_results}
      <div class='lg-poll-results' id='lg-poll-results-29'>
        <ul class='lg-polls-answers'>
        {results_answers}
        <li class='a-{answer_count}'>
          <span class='answer'>{answer}</span>
          <span class='answer-total-votes'>{answer_total_votes} votes &nbsp;&nbsp; <b>{answer_percentage}%</b></span>
        </li>
        {/results_answers}
        </ul>
        <div class='poll-total-votes'>Total Votes: {poll_total_votes}</div>
      </div>
    {if:else}
      {if show_results_after_poll && has_voted}The results of the poll will be made available on {expiration_date}{/if}
      {if never_show_results && has_voted}The results of this poll will be made public at a later date.{/if}
    {/if}



  {/exp:lg_polls:poll}

{/exp:weblog:entries}
A: 

I'm not 100% sure, since I haven't used LG Polls before, but try adding in dynamic="off" to your exp:weblog:entries opening tag. That will prevent EE from trying to find entries within the weblog you're calling based on the URL. See the link below:

http://expressionengine.com/legacy_docs/modules/weblog/parameters.html#par_dynamic

pstinnett
Hi, I forgot to update here :/ but I have already fixed the problem with dynamic="off" :) Thanks anyway
artmania