Hi I'm still developing my website so, I set web_status to yes but, I want that the end users can see only Home page but on the home page there is links to other pages. Therefore I would like to ask how can display a message that shows the end users the other pages are under construction.
Thank you for your help.
Hi I'm still developing my website so, I set web_status to yes but, I want that the end users can see only Home page but on the home page there is links to other pages. Therefore I would like to ask how can display a message that shows the end users the other pages are under construction.
Thank you for your help.
-
☆ A M B ☆
- 24,524 Posts
You could use an output modifier to load a chunk
[[[[++site_status:is=`0`:then=`$offlineChunk`]]]]
If the doubled tag is confusing, see this
https://modx.com/blog/2012/09/14/tags-as-the-result-or-how-conditionals-are-like-mosquitoes/
I don't understand how I can do it I would like ask your help again
thank you
I think the site_status - check is not what you want.
But you can create your own system-setting
Name it for example 'under_construction' and set it to 1
Then you can show a chunk in your template(s) as long, as this setting is set to 1 with Susan's code-snippet like:
[[[[++under_construction:is=`1`:then=`$offlineChunk`]]]]
This will show the content of a chunk with name 'offlineChunk' on your pages.
Is it that, what you are after?
-
☆ A M B ☆
- 24,524 Posts
site_status is 1 for online, 0 for offline.
he wants to set site_status to 1, but show a under_construction-message until the site is ready, if I'm not wrong
But I'm not really sure, what he wants.
-
☆ A M B ☆
- 24,524 Posts
I presumed he's using resource #1 as his offline page, but of course the links in the menu won't work, they'll just return to the home page.
Personally I don't think that's a good idea, there should always be a dedicated offline page, just as there should be a dedicated 404 error page and an unauthorized page (if logins are being used).
I think they want a live page with some links on it, but to tell the user that *some* pages linked *on* that live page are under construction. Sets web_status to yes, but wants some pages to be 'under construction', and probably others to not be.
OP, pls tell us clearly what you want, if I understand you correctly, here is my suggestion:
It comes down to your list of links on your page. If you are hard coding them or using a tool for them. If you are using a tool, you can use that tool to separate the links according to finished or not.
If you are just hardcoding links for now, my suggestion would be simply to make a column or area for under construction links, and put them there. Then, when you finish the page, you can move it manually to another area because its not under construction anymore.
Using a tool can handle this as well, but it does involve a little work. The issue would be that the page needs a characteristic (finished=yes/no) and the tool would move the link when the characteristic was changed.
Using a tool for links allows you to have dynamic links, which is so useful, then you can just make a new page, put it in the right folder in your tree, and the page will update with the new link available. MIGX is a great tool for this. That's just FYI.
Heck, you could just not publish the pages you didn't finish, and then they aren't even available to the user, no matter if the link is there or not. If you made a custom 404 page this could look acceptable during development...
-
☆ A M B ☆
- 24,524 Posts
If that's the case, then indeed leave the unfinished resources unpublished (a logged-in Manager user can still view them) and set the properties of the menu snippet - pdoMenu, preferably - to show unpublished resources, but in the rowTpl use an output modifier to determine what to output for the menu item's URL and link text.