Copied to clipboard

Flag this post as spam?

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


  • Christina 78 posts 257 karma points notactivated
    1 week ago
    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 4539 posts 16232 karma points MVP 2x admin
    1 week ago
    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 78 posts 257 karma points notactivated
    1 week ago
    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