How to convert an article into section without losing its address

Answered

1 Comments

  • Abdul Qabiz
    Comment actions Permalink

    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:

    1. You have an article (that served as list of other articles) that's linked in many places on web, even indexed in search engine.
    2. 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)
    3. 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

     

     

     

    0

Please sign in to leave a comment.

Powered by Zendesk