I am converting my static website to CouchCMS. My website url is 2nd result at google search for a particular keyword. I created a clonable template at index.php and posted number of posts. whenever i type www.mywebsiteurl.com an empty page appears. I know it can be fixed by placing blog_list.html in snippets folder. But I don't want to do it.
I want that whenever a user types www.mywebsiteurl.com, one of my blog posts should appear and not a html file from snippet folder. One of the user suggested that I should do a redirect to blog post with the following code.
But the problem is if I redirect my homepage url to url of the post, home page url no longer exits. When a user types www.mywebsiteurl.com it gets redirected to www.mywebsiteurl.com/some-post-url.html. If I accept this method then there will be no content left at www.mywebsiteurl.com and I will loose the pagerank.
I want that the post should appear at homepage url (www.mywebsiteurl.com).
If only way to achieve this is by placing an html file in snippet folder then I want that if I do some changes to design of template at index.html, the changes should also reflect at html file in snippet folder. But then also there will always be inconvenience while updating the content of homepage by editing the file separately and not like any other post.
Please Suggest the best solution. Thank You in advance!
I want that whenever a user types www.mywebsiteurl.com, one of my blog posts should appear and not a html file from snippet folder. One of the user suggested that I should do a redirect to blog post with the following code.
- Code: Select all
<!-- Do not allow anything other than page-view -->
<cms:if "<cms:not k_is_page />">
<cms:redirect "<cms:link masterpage='index.php' page='some-blog-post-page-name' />" />
</cms:if>
<!-- Now we should be on page-view with all variables for a blog post available -->
<h1 id="blog_post_title"><cms:show k_page_title /></h1>
But the problem is if I redirect my homepage url to url of the post, home page url no longer exits. When a user types www.mywebsiteurl.com it gets redirected to www.mywebsiteurl.com/some-post-url.html. If I accept this method then there will be no content left at www.mywebsiteurl.com and I will loose the pagerank.
I want that the post should appear at homepage url (www.mywebsiteurl.com).
If only way to achieve this is by placing an html file in snippet folder then I want that if I do some changes to design of template at index.html, the changes should also reflect at html file in snippet folder. But then also there will always be inconvenience while updating the content of homepage by editing the file separately and not like any other post.
Please Suggest the best solution. Thank You in advance!