Marcel Epp Posted March 13, 2018 Share Posted March 13, 2018 Hi, i'm stuck here with a problem. I want to change the user that created a site. And i want to change the published date time. But i can't find an option in the admin area. Does Processwire have these options? Or is there a modul for that? thanks Link to comment Share on other sites More sharing options...
Zeka Posted March 13, 2018 Share Posted March 13, 2018 There is an option in template settings (Advanced tab -> Template toggles -> Allow the 'created user' to be changed on pages ) Is that what you are looking for? 1 Link to comment Share on other sites More sharing options...
Marcel Epp Posted March 13, 2018 Author Share Posted March 13, 2018 Hi Zeka, that solves the problem for the user. Tahnk you! But the second problem still persist. How can i change the published date in the admin area? Link to comment Share on other sites More sharing options...
Zeka Posted March 13, 2018 Share Posted March 13, 2018 As far as I know, there is no way to change created and modified date in the admin area. The best way is to create custom publish_date or craeate_date fields or use this module http://modules.processwire.com/modules/schedule-pages/ 1 Link to comment Share on other sites More sharing options...
Marcel Epp Posted March 13, 2018 Author Share Posted March 13, 2018 Thanks, i will try the module for now. Link to comment Share on other sites More sharing options...
szabesz Posted March 13, 2018 Share Posted March 13, 2018 2 hours ago, Marcel Epp said: How can i change the published date in the admin area? I also always create custom fields for a published date for being used on the frontend. PW's created/modified/published dates are more for "auditing" than for public display, I think. However, for the record you can do things like this: 1 Link to comment Share on other sites More sharing options...
Marcel Epp Posted March 14, 2018 Author Share Posted March 14, 2018 One solution i thought of is to create a new datetime field like "page_published". And when you create a new page the field get filled with the current date. But i can't output the field like the others. I build myself a little blog. <!-- the logic --> <?php $blog_posts = $pages->find('template=blog-single, limit=1, sort=-created'); ?> <?php foreach($blog_posts as $blog_post): ?> <?php $blog_post_publish_date = date('d.m.Y', $blog_post->published); $blog_post_created_by = $blog_post->createdUser->name; ?> But when i change $blog_post->published to $blog_post->page_published i get an empty result. This is from the overview site from the blog. Link to comment Share on other sites More sharing options...
Marcel Epp Posted March 14, 2018 Author Share Posted March 14, 2018 OK it is working now. For the overview page i used: <p class="text-center">veröffentlicht am <?= $blog_post->page_published ?></p> And for my single blog page i used: <p class="text-center">veröffentlicht am <?= $page->page_published ?></p> So creating an extra field and put this in the single blog file is like a workaround. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now