Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 611705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:48:48+00:00 2026-05-13T17:48:48+00:00

Is it in usercontrols / xslt renderings possible to check wheter an item has

  • 0

Is it in usercontrols / xslt renderings possible to check wheter an item has it’s publishing restricted or is not publishable in the Sitecore CMS?
We get some situations where we explain users of the CMS how to set publishing restrictions and get back questions about items showing standard values on the website. For example:

  • I have an item and it contains fields with information.
  • I publish this item and everthing is fine. Content is being shown on the website.
  • I change publishing restrictions and say it can only be published from 23-02-2010 to 25-02-2010.
  • What happens now is that when i publish the website again, the item that was shown correctly before now shows Standard Values.

EDIT:

  • The item i am talking about has only
    one version. (Dutch – version 1) The
    item is just made through insert from
    template and filled with information.
    After it is filled with the info,
    Publishing restrictions are set up.
    When this is done and the item is not
    falling within the date of that
    restriction i see standard values @
    front.

Publishing restrictions can be used to make sure information is only shown in some period of time right?
Is this something we can fix in our code? Can we check wheter an item is not in the range of the public resctrictions / unpublished?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T17:48:48+00:00Added an answer on May 13, 2026 at 5:48 pm

    So again to give other users the option to check for an answer to this question i’ll answer my own question.

    If a user in the CMS of Sitecore specifies a range where an item can be published in and you see a standard value appearing on the front:

    • Look up the class / rendering whatever that shows the information
    • Make sure your code is checking for versions available

    If there is only one version available like in my case , and there are no other versions while the date of today falls outside the range specified doing a simple Item.Empty check will be enough.

    Whenever you have a Sitecore item that you need to handle:

    item has versions in context language?? -> item.Versions.Count

    item may be published?? -> !item.Publishing.IsValid(DateTime.Today, false)

    item has layout?? -> item.Visualization.GetLayout(Sitecore.Context.Device)

    I hope this information will once be usefull to somebody!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does UserControls in asp.net degrades performance. MasterPage has its own life cycle Page has
I have three usercontrols uc1.ascx ,uc2.ascx ,UC_Combined.ascx UC1 has one label control UC2 has
I use some UserControls which get created and destroyed within my application during runtime
I currently have 2 UserControls on my page. The first UserControl1 has a listbox
I am not able to deep copy UserControls because they are not marked as
I have just discovered that UserControls in a TabControl will not load until the
We have some UserControls that can not be designed. So the Windows Forms Designer
I want to change UserControls on button clicks (I'm not going to complicate here,
My Mainpage has a menu that loads usercontrols into a Stackpannel. I've got several
I have some UserControls that I created in ProjectA. I have ProjectB that has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.