DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Page HasBeenPublished status

 5 Replies
 0 Subscribed to this topic
 40 Subscribed to this forum
Sort:
Author
Messages
Advanced Member
Posts: 243
Advanced Member
2 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
2 Engaged Reader
Engaged Reader
You are an engaged reader!

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?

Growing Member
Posts: 61
Growing Member
4 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
4 Engaged Reader
Engaged Reader
You are an engaged reader!
2 Avid Reader
Avid Reader
Avid Reader art thou!
2 Most Liked
Most Liked
Congrats, your posts are really liked!

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.

Advanced Member
Posts: 243
Advanced Member
2 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
2 Engaged Reader
Engaged Reader
You are an engaged reader!

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.

Growing Member
Posts: 61
Growing Member
4 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
4 Engaged Reader
Engaged Reader
You are an engaged reader!
2 Avid Reader
Avid Reader
Avid Reader art thou!
2 Most Liked
Most Liked
Congrats, your posts are really liked!

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+).

Advanced Member
Posts: 243
Advanced Member
2 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
2 Engaged Reader
Engaged Reader
You are an engaged reader!

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

Growing Member
Posts: 61
Growing Member
4 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
New Poster
New Poster
Congrats on posting!
4 Engaged Reader
Engaged Reader
You are an engaged reader!
2 Avid Reader
Avid Reader
Avid Reader art thou!
2 Most Liked
Most Liked
Congrats, your posts are really liked!

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:

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved