Topic: "Related articles" using tags in cutenews 2.0

First of, I really like the new cutenews! It's definitely an improvement, the rewrite function is awesome, as well as a lot of other additions.

In particular I am using the tags, but wondered if there is a way to refer to articles using one or more of the same tags in a newspost? As it is setup now, you have to first click on a tag to go to the articles that use this tag.

For example, if I write an article about the benifits of coffee, I would like that related articles that use the tag coffee already appear at the bottom of this articlepost, instead of needing to click on the tag first.

I don't know if it's possible, but thanks!

Re: "Related articles" using tags in cutenews 2.0

Great idea !

3 (edited by 2014-09-11 12:30:00)

Re: "Related articles" using tags in cutenews 2.0

First of, I really like the new cutenews! It's definitely an improvement, the rewrite function is awesome, as well as a lot of other additions.

In particular I am using the tags, but wondered if there is a way to refer to articles using one or more of the same tags in a newspost? As it is setup now, you have to first click on a tag to go to the articles that use this tag.

For example, if I write an article about the benifits of coffee, I would like that related articles that use the tag coffee already appear at the bottom of this articlepost, instead of needing to click on the tag first.

I don't know if it's possible, but thanks!

Dear sibet,

You cannot do it without additional programming.
First off, you can try the following code:

include("some_path/show_news.php");

if(isset($_GET['id']))
{
    $nid = cn_id_alias($_GET['id']);
    $nent = db_news_load(db_get_nloc($nid));
    $tag=$nent[$nid]['tg'];
    $_GET=array();
    include("some_path/show_news.php");
}
Best regards,
CN Support team

4 (edited by 2014-09-11 18:23:43)

Re: "Related articles" using tags in cutenews 2.0

Thanks, but I tried the code and I didn't get any results. It said something like query empty.

I have also noticed that once you click through on a tag, that on the "tag-page" it interfers with other show_news includes (for examples headlines). The "headlines" would only display the oldest newstitle that is related to the tag. In the example this would be on the page news.php?tag=coffee (without SEO rewrite).


Also I have not found it possible to edit the template of this "tag-page". I would like to include something like "Related articles to coffee", with "coffee" being the tag that would be changed automaticly.