Jump to content

hidden vs unpublished - for select values


bwakad
 Share

Recommended Posts

What is the difference between the hidden and unpublished?

I know i can use either one to NOT display them in a menu. The hidden won't let them appear in lists and searches. But unpublished basically does the same thing for what I use these pages for....

I use a number of parent pages and it's children to create values for radio or selects. I add fields for this to a template. Then I simply display it's values. Which one of those two do I use, and only on the parent or on all children too?

example:

household

- alone

- with parents

- with children

Link to comment
Share on other sites

What is the difference between the hidden and unpublished?

I know i can use either one to NOT display them in a menu. The hidden won't let them appear in lists and searches. But unpublished basically does the same thing for what I use these pages for....

I use a number of parent pages and it's children to create values for radio or selects. I add fields for this to a template. Then I simply display it's values. Which one of those two do I use, and only on the parent or on all children too?

example:

household

- alone

- with parents

- with children

Generally: hidden prevents pages from being listed in menus, foreach loops and searches, but if you now the path to the page, you will be able to call it, even when being guest (meaning: not having permission to see unpublished pages).

Unpublished means hidden in lists (like mentioned above) AND, for users that do not have the permission to see unpublished pages, inaccessible even via its path/URL.

I assume you have that page reference construct built in the backend. There, unless actively changed, you are superuser. "Hidden" pages will appear in such a reference field, "unpublished" ones won't.

Edited by marcus
  • Like 6
Link to comment
Share on other sites

Generally: hidden prevents pages from being listed in menus, foreach loops and searches, but if you now the path to the page, you will be able to call it, even when being guest (meaning: not having permission to see unpublished pages).

IF there is a template file for those pages.

Often for select fields I create a Tools template which is just an empty template with no file. That way I can set up things like selects (where I don't want them to be pages on the site) and not worry about anyone guessing the URL.

I always set them to hidden. Unpublished implies you're not wanting to use a page yet.

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

Just to be clear on this topic:

I created 2 selects in front-end. Parents are hidden.

With "hidden" child-pages (even if I specify the path) not display values.

With "un-hidden" child-pages - meaning published - does display values.

So I think for selects:

the key element for not displaying in a menu is the parent state.

the key element for not displaying in a select is the child state.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...