Copied to clipboard

Flag this post as spam?

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


  • Christina 127 posts 390 karma points notactivated
    Jun 11, 2018 @ 16:50
    Christina
    0

    Taglist with link to tagged page

    Hi I need som help with a taglist

    I have a list with contentpages that are tagged with different categories , and I want to click on the tag and go to the tagged categorypage. Can someone help me in right direction, many thanks Christina

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Jun 12, 2018 @ 10:50
    Alex Skrypnyk
    0

    Hi Christina

    How did you implement tags? Is it Umbraco Tags property editor?

    How can we define selected category?

    We can pass selected tag via GET param like:

    /hello?selectedTag=tag1

    And in the code of "hello" page find selected category by "tag1"

    Thanks,

    Alex

  • Christina 127 posts 390 karma points notactivated
    Jun 12, 2018 @ 14:51
    Christina
    0

    Hi Alex many thanks

    I'm not sure how to do that,maybe tag editor is wrong way. I want to click on the tag and go to the categorypage note the pages who has the tag.

    string tag = Request.QueryString["tag"];

    if (!tag.IsNullOrWhiteSpace())
    {
        var publishedContent = Umbraco.TagQuery.GetContentByTag(tag);
    
        if (publishedContent.Count() > 0)
        {
            foreach (var item in publishedContent
                .Where(?))
            {
    

    @item.GetPropertyValue("pageTitle") } }

Please Sign in or register to post replies

Write your reply to:

Draft