Problems, need help? Have a tip or advice? Post it here.
14 posts Page 2 of 2
Thank you very much for replying and helping me. Great support! Sir, the link of my post that I want to use on homepage url is http://dp1994121.000webhostapp.com/raavi-font-typing-tutor.html. I have unpulished the post in couch but sir the link of the post is still working, I don't know why! Please help.
It is not working for non-admins. I got 'Page not found' message. :D
Code: Select all
<cms:embed 'page.html' />


The solution KK sir has suggested solves the problem of duplicate content but it again causes the problem that if i do any changes to index.php (Like addition of link in navigation bar), the changes doesn't reflect on homepage because homepage has been embed from standalone html page.

Code: Select all
<cms:else/>
<cms:masquerade "<cms:link masterpage='index.php' page='raavi-font-typing-tutor' />" />
</cms:if>


If I use above code, it causes duplicate content but whenever i do any changes to index.php, it reflects on homepage too.

Code: Select all
<cms:else />
    <cms:pages masterpage='index.php' page_name='raavi-font-typing-tutor' limit='1' show_unpublished='1'>
        <cms:embed 'page.html' />
    </cms:pages>
</cms:if>



If I use above code, it solves problem of duplicate content but when i make any changes to index.php (like changing color of navigation), they doesn't reflect on homepage.


Please help me achieve both the effects so that when i publish my website in couchcms i don't get penalized for duplicate content by Google and whole website can be managed by making changes to index.php. Thank you for helping me ! :)
@dp121, I am sorry to say but it seems you have not been paying attention to what I have suggested several times now.
I'll repeat it once again -
Here is the full solution I suggested
Code: Select all
<cms:if k_is_page>
    <cms:embed 'page.html' />
<cms:else />
    <cms:pages masterpage='index.php' page_name='raavi-font-typing-tutor' limit='1' show_unpublished='1'>
        <cms:embed 'page.html' />
    </cms:pages>
</cms:if>

Please notice above that the <cms:embed 'page.html' /> statement is being used *twice* - that is to say the *same* snippet is used on the homepage as well as the inner pages.

Needless to say, if the same snippet is being displayed on both locations, any changes done to the snippet will also reflect on both the locations, right? That should solve your problem of not having to make changes on multiple locations.

Hope it helps.
14 posts Page 2 of 2