
Originally Posted by
Acorn
For completeness, these are the Methods I have used for Showing and Hiding objects.
Acorn
I used MarkDown in my original web page:
**Object** > Put to Back (**_Ctrl+B_**)
Basically, you are hiding things behind other things. Useful if the objects are also Soft-Grouped. Awkward if you move the top-most object and forget about the one(s) under.
CSS Reveal Effects.
Web Animation > Mouse Over > Mouse over effects.
***
**Object** off the **Page** background
Visible in the design page and will not be published. Useful for notes. I suggest putting all such notes into a Notes layer and hiding that (See **Layer** below). Problems arise if using actions like Select All and accidentally grouping.
If you have Web Properties >Website > Other > Clip to Page edges: unticked then if the off-page objects are just touching the background, they are published.
***
**Object** > **Page & Layer gallery** > Hide
Not visible in the Design page and will not be published.
The hardest one to justify. Better to add into a Layer that is presently hidden as unhiding a Layer is easier than unhiding scores of Objects.
***
**Layer** > **Page & Layer gallery** > Hide
Not visible in the Design page and will not be published.
Useful to toggle on & off when working and off when publishing. However, if the Layer is linked from any Object, it is published and stays hidden.
***
**Object** with **Placeholder** code
At simplest, add `<div id="xyz"></div>` to [Placeholder]() Body HTML (code). Object always visible but never publishes.
Always add an id. Allows for subsequent code to be added from user interaction or other events.
***
**Object** with a **[Name]()** and a Style
Give the Object a special Name of `htmlclass="hide"`.
Add CSS to website or page HTML code (head):
`<style> .hide { display: none; } </style>` or
`<style> .hide { visibility: hidden; </style> }` or
`<style> .hide { z-index: -9999; </style> }`
Useful if using other CSS to reveal the Object as some stage.
Using `z-index` will put the Object behind one it is currently in front of your design; the use of **Sticky** and **Sticky at Top** can affects this approach.
***
**Layer** that has an **Object** that links to the **Layer**.
This hides the Objects but the Layer always publishes whether hidden or visible. Linking object can be on the same Layer.
Useful for adding images that can be referenced elsewhere.
***
**Layer** with a Bang (!) prefix to the Layer Name
Even when the Layer is hidden, it gets published and the Objects are visible.
Useful in design mode to reduce screen clutter but still get the correct site published.
***
**Page** (actually all **Layers**)
Simply hide all Layers.
Prevents any of the Page content being published other than Objects on the Page and Pasteboard backgrounds. See [Xara Undocumented Features](https://helpandsupport.xara.com/xara_desktop/knowledgebase/support_questions/web-features/26-undocumented-and-advanced-web-features.html){target=_blank} > Layers
***
**Page** with Meta Redirect
Add `<meta http-equiv="refresh" content="0;url=index.htm/">` to immediately go the the home page.
Use sparingly as you will forget about it being in place. Mucks up the Back button. Instead, I sometimes add a Button with label “Redirect” and a link to the Home page. In code, a Placeholder with:
`<p><a href="index.htm">Redirect</a></p>`. Both won’t hurt.
***
**Page** with JavaScript Redirect
Add a [Placeholder]() or put in the Page HTML code (head):
`<script>setTimeout("window.open('index.htm', '_self')", 0); </script>`
Not particularly recommended as it is JavaScript and interferes with the loading of the page. redirect to the same page and you get stuck in a loop. Replace the 0 a any number of milliseconds to delay the jump. Mucks up the Back button.
***
**Object** > Reveal Trigger
Web Animation > Reveal/Scroll > Trigger object name; with a typed-in Name that is random and is not associated with another object, the Object will never display, but is published.
Powerful as the Object can be revealed with JS/CSS and the Trigger Name could be added into the DOM…
***
Bookmarks