As a user, I can visualize the variants in the pages tree, so that I see more clearly which pages are personalized (MGNLPN-57)

[MGNLPN-54] Variant of a first level page has incomplete navigation Created: 26/Mar/14  Updated: 02/May/14  Resolved: 26/Mar/14

Status: Closed
Project: Magnolia Personalization
Component/s: Integration
Affects Version/s: None
Fix Version/s: 1.0

Type: Sub-task Priority: Neutral
Reporter: Roman Kovařík Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: navigation
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Sprint: 5.3 Sprint 5, 5.3 Sprint 6

 Description   

Steps to reproduce:

  1. Create variant of a home page.
  2. Preview this variant.
  3. Navigation contains only active page.
  • home0
    • variant0

Explanation:

public static Node findParentWithTemplateCategory(Node pageNode, String templateCategory) throws RepositoryException {
        ...
            if (TemplateCategoryUtil.hasTemplateOfCategory(current, templateCategory)) {
                return current; //returns variant which hasn't child pages to add to navigation if it's home page
            }
            ...
            current = current.getParent(); //but if it's not home then the parent of real node (not variant) is returned, so it works for other then home pages, but that's only luckily consequence
        }
        return null;
    }

Custom info.magnolia.p13n.decoration.P13nNodeWrapper.getNodes() has to be implemented.



 Comments   
Comment by Roman Kovařík [ 26/Mar/14 ]

Commit:
https://git.magnolia-cms.com/gitweb/?p=enterprise/p13n.git;a=commitdiff;h=6507b00ed12143ba74fac28446b86c5b3cfafe61

Generated at Mon Feb 12 06:33:51 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.