Restrict Display

When publishing content (such as Routes, Posts, Announcements, Collection and Pins), you can define specific URL patterns where the content should appear. This helps ensure content is shown only on relevant pages.

Functionality

  • Users can add new patterns using a plus (+) button.
  • Activate or Deactivate patterns.
  • Delete unwanted patterns.

Pattern Rules & Flexibility:

  • Users can add up to 5 URL patterns for each piece of content.
  • Supports wildcards (*) for greater flexibility.
  • Users can match patterns in any part of the URL including:
    • Pathname
    • Query parameters

Examples of Supported Patterns:

Pattern ExampleDescription
/*admin*/settingsMatches any path with "admin" in it before "settings"
#role_*adminMatches fragment identifiers like #role_superadmin
?userrole=the*roleMatches query strings with values like the_admin_role
xx*=1*2Matches keys or values containing 1 followed by 2

EXAMPLE

Let's take an example of a Route Restrict display while publishing.

When publishing a route in AppNavi, you can restrict its display by adding a specific URL pattern. This ensures that the route is only visible on designated pages of application and hidden elsewhere.

  1. Add a Pattern While Publishing
  • During the publishing process, define a specific URL pattern for the route.
    example define pattern : /reference/react
  • This pattern determines where the route will be displayed.
  1. Check on the Avatar Side
    On the avatar interface, the route appears only when the user is on a page matching the defined pattern.
  2. Restricted on Other Links
    For example, if you navigate to a /community or /reference page or any other URL that does not match the pattern, the route will not be displayed there on avatar.

URL-Based Display Rules for Content Visibility

This section explains how the "Restrict Display On" setting affects the visibility of content (e.g., Routes, Posts, or Announcements) based on URL configurations and their activation status.

  1. Restrict Display ON → No URL Configured
    • Result: Content is displayed on all pages.
    • Explanation: Since no URL pattern is defined, the restriction has no effect and the content is shown everywhere.
  2. Restrict Display ON → One URL Configured (Inactive)
    • Result: Content is displayed on all pages as URL is inactive.
    • Explanation: An inactive URL is ignored. As there are no active URLs, the restriction is effectively bypassed.
  3. Restrict Display ON → Two URLs Configured (One Active, One Inactive)
    • Result: Content is displayed only on the active URL.
    • Explanation: The restriction applies only to active URL patterns. The inactive one is ignored.
  4. Restrict Display OFF → URLs Configured (Active or Inactive)
    • Result: Content is displayed on all pages.
    • Explanation: The "Restrict Display" toggle is off, so the system does not consider any URL patterns regardless of their status.