Navigation widget using oh-repeater and tags?

Hi I’m trying to make a navigation widget that will be a popup using oh-list and oh-repeater but not having any success.
I’ve been searching through the forum without seeing any hints or if this has been done.

My goal is to populate this widget by specifying pages that have a certain tag, for example tagged with ‘navpage’.
I’m using one of the many repeater widgets that have been posted as a starting point and modifying it for my testing, for example Rich’s ‘All Lights’ widget at: A couple of simple oh-repeater examples

One thing I have noticed is the sourcetype line which is for an item, but I’m trying to iterate through pages so I have also tried it with source of pages

sourceType: itemsWithTags

vs

sourceType: pagesWithTags

Any hints for this would be appreciated thanks.

Craig

This does not work because the repeater simply is not constructed to work with pages. See the repeater documentation for a list of the only available options in sourceType:

To do this automatically is possibly doable, but not completely within a widget. It would require at the very least some outside source of information about the page, such as a rule that actually calls the UI API (I don’t believe any of the current rules languages offer direct access to the UI elements) and an additional item to store the information.

However, there’s also probably very little reason to try and build the widget so that this information is gathered automatically. I’m going to guess that you are not adding or deleting pages very frequently. It will definitely take less of your time over the long run to just build the widget with the page information hard coded in the widget (which you then have to change on the rare occasions when you add or remove a page) than it will to work out a system to do this automatically.

If I were trying to build this I would probably just make the array of page information right in the repeater:

- component: oh-repeater
  config:
    for: page
    in: 
      - pageID: overview
        tagList:
          - guests
          - admin
          - users
      - pageID: settings_house
        tagList:
          - admin
      - pageID: settings_movieTime
        tagList:
          - users
          - admin

Thanks Justin.

I was grasping at straws with the ‘pagesWithTags’ type, hoping I had missed something while searching through the forum and documentation and I was incorrectly defining the type or it just was not well documented yet…

I do agree, my pages will not change much. I’m currently remaking my UI and was using the mindset of having the software do the work for me by adding with a tag via repeater as I progress and add more pages. And with this thought since I can’t be the first person to think of this, but couldn’t find much discussion for it in the forums was if the widget worked out well it could be a widget to share with the community that would need very little configuration, just adding a tag to pages.

As always thanks for your help.
Craig