Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Biagio Paruolo 1619 posts 1911 karma points c-trib
    Jun 02, 2016 @ 06:12
    Biagio Paruolo
    0

    Related post

    Hi,

    Ho to create the related post? I think that post is related to others when its have X tags in common with others. Some example?

  • Manish 373 posts 932 karma points
    Jun 02, 2016 @ 06:29
    Manish
    0

    Hi Biagio

    • . Create Archetype property in developer section(In data type) and take fields you need

    enter image description here

    • set the values from CMS
    • @foreach (var item in Model.Content.GetPropertyValue<JArray>("relatedcontents"))
                      {
                          MVCUmbraco.Models.RelatedContents relatedContents = new MVCUmbraco.Models.RelatedContents();
                              var linkUrl = (item.Value<bool>("isInternal")) ? Umbraco.NiceUrl(item.Value<int>("internal")) : item.Value<string>("link");
                          var linkTarget = item.Value<bool>("newWindow") ? "_blank" : null;
                          var pageID = (item.Value<bool>("internal")) ? item.Value<int>("internal") : 0;
      
      
      ..
      

      .... ...

                      }
      

    Manish

  • Biagio Paruolo 1619 posts 1911 karma points c-trib
    Jun 02, 2016 @ 06:46
    Biagio Paruolo
    0

    Hi, Thank for your reply, but I think something automated and not manually related. The model that I suggest is used by other blogs and based on taxonomy.

  • Manish 373 posts 932 karma points
    Jun 02, 2016 @ 07:17
  • Biagio Paruolo 1619 posts 1911 karma points c-trib
    Jun 02, 2016 @ 08:10
    Biagio Paruolo
    0

    For?

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Jun 02, 2016 @ 08:20
    Ismail Mayat
    1

    Biagio,

    I wrote similarity package it uses lucene to find similar content see

    https://our.umbraco.org/projects/backoffice-extensions/similarity/

    you can see quick video here https://vimeo.com/86717216

    This version is old but there is newer version source code however I need to get link for it from Jordan who was updating it.

    Regards

    Ismial

  • Biagio Paruolo 1619 posts 1911 karma points c-trib
    Jun 02, 2016 @ 13:56
    Biagio Paruolo
    0

    Uhm..this is interesting. Works on tag datatype, too? Which is the logic to find similar information? Is't search a runtime?

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Jun 02, 2016 @ 14:06
    Ismail Mayat
    0

    Biago,

    Should do not tried it though. I am assuming the tags are stored in index as csv list if they are then it may not, however you won't know unless you try.

    If tags are in index as csv then you would need to make them space separated then they will be searchable and then it would definitely work on tags.

    Regards

    Ismail

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Jun 02, 2016 @ 09:10
    Ismail Mayat
    0

    Biagio,

    This is latest source code https://bitbucket.org/jlane/similarity/src I would use that as it will work with latest version of Umbraco

Please Sign in or register to post replies

Write your reply to:

Draft