0

I'm trying to add my embedded contact form template to one page for a blog entry. I've never had an issue with this template or embedding it until now.

Here is my code.

{embed="inc/html_header" page_title="{page_title} - {site_name}" 
      page_description="{meta-description}"}
<div class="blog-page entry-main">
    {embed="inc/nav"}

    {embed="blog/listing"}
</div>

{embed="contact/form"}
 <!--Hey footer footer-->
{embed="inc/html_footer"}

So the embedded html_footer appears on the entry template page just fine along with my random Hey footer comment. In fact, everything on this page displays correctly except for {embed="contact/form"}.

I've done so many things to try and fix this -- use snippets for the form, use conditionals to check for segment_3, etc, but still no success. The pages I'm trying to display have the root structure of:
/blog/entry/the-entry-post-title-whatever-user-enters

When I navigate to just /blog/entry/index.php. I see the footer, but also every single blog entry and the html header and footer embedded templates.

Any thoughts? I'm nearly going insane over this and even had a nightmare where I spent a day trying to figure this out. Dreams are not meant to infested with EE code. Thanks.

  • First: I should not use so many embeds. It's really bad for performance. Second: Where's the rest of the code? Is the problematic embed inside exp:channel:entries? Please, update your question. – Robson Sobral Jul 11 '15 at 12:24
-1

I feel dumb -- all I needed to do was add dynamic="no" to my form template channel entries tag. Lesson learned

| improve this answer | |
  • Don't beat yourself up @OP – William Isted Jul 5 '16 at 15:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.