Published Pages Setting

Les Girvan asked on December 16, 2021 16:33

Hi Guys, I have a page with banner using the teaser image of Page Menu type pages and looking to see how I can set a WHERE condition to show a page that is marked as published:

Image Text

I have search the database tables for this value, but cannot find it anywhere, can you advise please

Correct Answer

Juraj Ondrus answered on December 17, 2021 06:42

If you want to select just the published pages, you need to use WHERE condition like this:

([DocumentCanBePublished] = 1 AND ([DocumentPublishFrom] IS NULL OR [DocumentPublishFrom] <= GETDATE()) AND ([DocumentPublishTo] IS NULL OR [DocumentPublishTo] >= GETDATE()))

0 votesVote for this answer Unmark Correct answer

Recent Answers

Les Girvan answered on December 17, 2021 13:13

thanks Juraj, perfect

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.