Please note that this widget was introduced in Oomph 22.
Goto widget provides relative links to sections, with optional transition styles. Goto widget can have an image on.png in the resource folder to load into it's view the same as a bookmark widget (note that this widget is single state so it will only show the image on.png).
Goto widgets support the following actions:
Section offsets relative to the current page. The following will take you to the next section:
Or the previous section:
Or forward 5 sections:
There are several named section links.
- NextSection (same as section+1)
- PrevSection (same as section-1)
- FirstSection (goto to the first section)
- LastSection (goto to the last section)
- Contents (goto to the Contents if named Contents or 3rd section)
- Cover (goto Section named Cover or 1st section)
- Back (goto the previous page in the history - same as pressing the back button in the navigation bar)
- Forward (goto the next page in the history - same as pressing the forward button in the navigation bar)
Absolute Section/Page Jump
Please note, this feature is available in v23.0.1 or higher.
The destination section and page may be specified as an absolute position in the content using the following directives:
Note this feature operates in much the same way as Page link albeit with a different syntax. The advantage of using a Goto widget is the ability to provide images for the button press states (see below).
If a section name/number is specified without a page number it will default to page 1 in the destination section. If a page number is specified without a section it will jump to the numbered page in the current section. Some examples follow.
The following will take you to page 1 in section 30:
Or to a section referenced by name instead of number:
Jump to page 5 in the currently open section:
Jump to page 2 in the Travel section:
It is possible to add a transition effect to your goto.
The default transition style is None.
You can use any of the following transition styles.
Leave out the transition option to use None.
Custom Button Images
Please note, this feature is available in v23.0.0 or higher.
A goto widget behaves as a button, and as such it can display custom images for the various button pressed states. The images are completely optional and may be provided in the resource folder for the widget as follows:
- off.png displayed when not being pressed
- down.png displayed while pressed
The resource folder for a goto widget is simply the name of the widget itself. If you have multiple goto widgets you may optionally number them if you want to provide multiple resource sets.
For example, if you had the following goto widget:
You may provide a button-pressed image by adding the following folder and file:
There are 2 aliases for the Goto Widget provided as shortcuts to the full syntax as follows:
- PrevSection same as Goto,PrevSection
- NextSection same as Goto,NextSection