How to send to back an entity in LAYOUT

I have constructed a code that imports viewports to an existing LO template, however the viewport is always at the top of the others elements on the page.

It is possible to reorder that through the Ruby console? I couldn’t find that info

I think that you must place the entity upon a layer of it’s own, then use either the Layout::LayerInstance#reorder_entity() or Layout::Layers#reorder() method.

The draw order functions only work for things that are on a same layer. Layer order determines the stacking order of things on different layers.

1 Like

So, I can’t reorder inside an existing layer… Only reorder the layers. Right?

I don’t know about the API but as I said, the ordering works inside a layer. Between layers, layer order is what matters.

1 Like


FYI … How to find methods in the API documentation:

In the left navigation column, just below the list caption, are 3 lists: Classes, Methods and Files.

To display the list of methods, click the Methods link.

Once the Method List shows, you’ll see a Search: box below the list links.
In the box begin type part of what you think a method name might be (without quotes.)

For this use case, all I had to type was "reor" and the 3 methods for the LayOut API were shown, viz:


You can also get matches on substrings in the middle of method names.
Ie, try a search on: "entit" or "nam"