Jump to content

Recommended Posts

Posted

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

Posted

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? 

  • Like 1
Posted

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?

 

Posted
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:

 

  • Like 1
Posted

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.

Posted

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

  • Like 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...