In the database table "tabs" is a field "HasBeenPublished". It's always on 1.
I like to change this field to 0 when it's not active.
Is there an option in the DNN page interface to change the HasBeenPublished status?
That field is used by the Workflow system for page publishing (draft -> live). I would not recommend using or changing the data in those fields other than through the DNN UI.
Could you provide a little more context? What is the problem you are having that this is a possible solution to?
If you are in code and need custom data stored per "Page" I would highly recommend using your own custom TabSettings. Settings and retreiving your stored values via Dnn.Tab.TabSettings["MyModule_IsPublished"] is a good way to have your own custom fields for your pages. They are NOT visible in the PersonaBar Pages UI, but that is not usually an issue. Again, dependent on your context and the real problem we are solving.
Thanks Jeremy!!
Our DNN website is connected to a data platform. The data platform needs to know which pages exist, as well as which ones are active and which are allowed to be indexed.
Therefore, I’m looking for a field or mechanism to pass “active” and “index” statuses to the platform. These fields should be configurable by the user, allowing them to enable or disable them via the page settings interface within the CMS.
DNN has a PageSettings field built in (via TabInfo) for AllowIndex which the user (with permissions) can get to in PB/Content/Pages and then in the current Page's Settings, Advanced tab, SEO sub-tab, and the you should see an on/off switch for Allow Indexing.
I don't believe DNN has an field with a meaning exactly the same as Active. Also, don't be confused by the Advanced/More field named "Disable Page" that actually means "Disable Page Link" and is used in generating menus to signify a page that is a parent to child pages and therefore is "Link Disabled."
So if I was needing a list of Active Pages or a flag per pages that answers whether it is active, I would first improve my definition of "Active" to something like "page is visible to the user" and come up with a way to derive that based on permissions, scheduled status (is between start and end dates), and whatever else makes sense in your situation. In practice, I have often seen people use permissions for this basing the answer on whether or not the page is visible to the anonymous user. Which means under Permissions, you make a page not-active simply by unchecking the View permission for All Users (or Everyone if you are v10+).
Thanks Jeremy... the Allowindex and Disable Page will do... Can't find a way to add an checkbox field to the pagesettings "Active" without changing the core... I will add a featuren request to the core team and send him a whatsapp to do this ASAP
It wouldn't have to be in the core. There is no rule that says ALL page settings have to be edited through the PersonaBar pages. You could make a small custom module that directly edits the 3 fields you care about and easily handle updating both core page settings as well as your custom ones stored in TabSettings[]. I mean, the easy part assumes programming in C#, but everything about this is pretty basic with code example online going back years. It could also be done in structured content modules like OpenContent or 2sxc using Razor Views/Templates.
What is very nice about a custom solution is that you could provide a UI that only does what you need (edit those 3 fields) and easily assign Role based permissions.
These Forums are for the discussion of the open source CMS DNN platform and ecosystem.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.