How to convert an article into section without losing its address
답변함Hi, we've got an article in our guide with links to other articles. The main article is a "getting started" article where we make all our customers land and then we address to the specific article as the way you get started with our app changes based on the e-commerce platform you use. Now, we want this main article to be changed in a section and have the specific articles as articles in the section. The problem is that the main article is linked in many many places. How we can convert the article into a section without losing its address so that we do not lose links to it?
Hope the question is clear.
Thanks!
-
Carlo Dalessandro: What do you mean by changing main article? Are you going to replace it with another article? The article address doesn't change if you move article around in sections in same or different categories.
Let's say:
- You have an article (that served as list of other articles) that's linked in many places on web, even indexed in search engine.
- Now, you want to create another article in section and want this article to be main article (promoted or listed prominently somewhere on homepage -- landing page)
- You want user visiting (via bookmark, search engine, etc.) the old main article can still see old main article, or they are redirected to new main article?
You can redirect them to new article, you can put in some javascript that will check articleId, and if it's old article's id, you redirect user to new main article. You can put a script like following in article template, and of course change example article-ids with actual ones.
<script>
var oldArticleId = 360006759200; //old main article id
var newArticleId = 360006759554; //new main article id
var articleId = {{article.id}}; //current article id
if(articleId === oldArticleId) {
window.location = "/hc/articles/" + newArticleId;
}
</script>I wasn't sure what you are asking, so I just wrote different use-cases above.
Cheers,
Abdul Qabiz
Team Diziana
댓글을 남기려면 로그인하세요.
1 댓글