Go to Template

The go to template command is used to jump to another page and/or run a new template, from the start, with its list of commands.

The current scope is preserved when jumping to another template.

The go to template command cannot have any child commands.

If you want to navigate to another page by a link on the current one, use the Click command instead.

Command options

Stay on Page/Go to URL

You can choose to stay on the same page while navigating to a new template. Or, you can go to another URL, which you enter in the box below.

Select Template

You can create a new template by entering a name for the new template and clicking the Create New Template button. Alternatively, you can choose an existing template from the dropdown.

Depth

You can limit the maximum recursive depth for a go to template command. If this depth limit is reached, the command will simply do nothing. You can use 0 to set an unlimited depth.

You should use this command if you want to only parse a certain number of pages or templates.

Parallelization

Normally, commands can be expected to be executed in depth-first order. The go to template command is an exception to that rule. ParseHub makes it easy to create projects that span thousands or millions of pages. In order to ensure that your data is retrieved quickly, the workload needs to be split up among a fleet of servers.

When executing a go to template command, ParseHub will automatically offload the work to another server, then continue with executing the current template. This means that commands after the go to template command can be executed while the new template is still running. This sometimes results in unexpected behavior. For example, a list may be in a different order than it appears on the pages.

ParseHub will automatically figure out when it needs to wait for the go to template command to finish. For example, if the new template sets a property on the scope that is used by a later command, ParseHub will wait for that template to finish before executing the later command.

Have more questions? Submit request!

0 Comments

Please sign in to leave a comment.