0

When embedding a template gets error message described in the image attached.. need an immediate help.. thank you

{html-head}
{global-stylesheets}
{js-header}
{main-nav}
{main-nav-2}
{html-head-end}
<body>
{embed="includes/main-nav-3"}
{breadcrumb}
<!-- REST FILES -->
{if last_segment == '{segment_1}'}  
{exp:channel:entries channel="se" dynamic="yes"  url_title="solutions"}
    <h1 class="banner_title bold">
        {title}
    </h1>
                <p class="text-justify">{body_content}</p> 
</main>
{/exp:channel:entries}

{if:else}

{exp:channel:entries channel="co" dynamic="yes"  url_title="{segment_2}" }
        {title}
        </div>
    </div>

</main>
{/exp:channel:entries}
{/if}

<!-- REST FILES -->

{embed="includes/footer"}
{html-footer}
{js-footer}
{html-close}

enter image description here

10
  • How do you know it's the embed? and if so which one? Can you access the embeds directly (e.g. website.com/includes/main-nav-3) and do they render OK? – Peter Lewis Sep 26 '15 at 11:44
  • Hi Peter, Thank you for your immediate response..The problem is with {embed="includes/footer"} . "footer" template having another embeds inside. While im trying to embed ordinary template without any embeds is working fine. i dont understand why this is happening and im new to ee. – Praveen Kalarikkal Sep 28 '15 at 6:02
  • Also embed template structure getting broken if it includes channel entries for segment_2, <br/> localhost/sitename/index.php/segment_1 (WORKING), <br/>localhost/sitename/index.php/segment_1/segment_2 (NOT WORKING), – Praveen Kalarikkal Sep 28 '15 at 7:05
  • Normally when there's broken code in a template (embed) it can't render it, which may explain your issue. You should be able to target and display your embeds directly in the browser t ensure there's no parsing errors. Try index.php/includes/footer directly in the browser - what happens. Try index.php/includes/main-nav-3 (which you mention does work). If only the footer is failing, amend your question with the contents of that embed, as I expect there's something wrong in it. Also try process of elimination - temporarily change the content of the footer embed to just "hello world". – Peter Lewis Sep 28 '15 at 8:47
  • Your segment_2 issue is separate due to your template structure - it's bad practice to close tags that aren't opened in the same tag pair - if that tag pair fails to deliver, you'll get unclosed html tags. I'll detail that more fully once you add some more details based on my other comment. – Peter Lewis Sep 28 '15 at 8:50

Your Answer

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

Browse other questions tagged or ask your own question.