.Data.Pages and .Pages

Continuing the discussion from [Solved] Podcast Feed not being built:

@kaushalmodi could you tell me how this is different from the docs?

My main reference is from Page Variables (emphasis mine):

.Pages
a collection of associated pages. This value will be nil for regular content pages. .Pages is an alias for .Data.Pages.

I ask, because I don’t know the significance of it, either way. :slight_smile: But it sounds like one may be deprecated, and the docs have yet to point that out. What will the docs say?

No, .Data.Pages is not deprecated… But using the .Pages instead in that case just makes it clearer for everyone (you don’t see .Pages referenced somewhere, and then .Data.Pages referenced somewhere else, and end up in confusion).

I meant to say that the examples in docs need to be updated for this. Here is a summary of how I think replacements should happen in the docs. As you seen from the summary, you never need to use the .Data prefix when accessing .Pages at any level.

That very useful indeed!

1 Like