Loading

page.status

Is there a page variable to get the status of a page? Like if a page is published, archived, drafted etc?

If a page has children, and any of those children are published, I want to print a header message and links to the children. But if there are no published children I don't want to even print the header message.

How does most_recent_published_descendants work?

Official response from Jim Gilliam completed

published is now available

How would you tag this suggestion?
Do you like this suggestion?

Showing 4 reactions


Jerimee Richir commented 2012-01-11 11:35:53 -0800 · Flag
sweet
Jim Gilliam responded with completed 2011-10-13 10:51:43 -0700

Is there a page variable to get the status of a page? Like if a page is published, archived, drafted etc?

If a page has children, and any of those children are published, I want to print a header message and links to the children. But if there are no published children I don't want to even print the header message.

How does most_recent_published_descendants work?

Jerimee Richir commented 2011-08-21 13:32:59 -0700 · Flag
This doesn’t get you the status a page but it does let you check for published children only (as opposed to any children, published or otherwise):

{% if page.most_recent_published_descendants != empty %}