Page 1 of 1

How to change author's name in CGBlog

Posted: Thu Jan 18, 2018 11:05 pm
by master3395
Does anyone know a way to change the author's name in CGBlog? without

1. Changing user
2. Changing tables in database

Re: How to change author's name in CGBlog

Posted: Fri Jan 19, 2018 8:43 am
by Rolf
Add a custom field to the module and use that one for the author name shown in the frontend

Re: How to change author's name in CGBlog

Posted: Fri Jan 19, 2018 2:25 pm
by paulbaker
Or: If you want to change the author for all posts, look for this in the summary template (for example):

Code: Select all

{if $entry->author}
	<div class="CGBlogSummaryAuthor">
		{$author_label} {$entry->author}
	</div>
{/if}
and replace {$entry->author} with the new name.

If you want to change for just one person's posts you should be able to do an if-then-else with smarty to display a new name conditionally:
https://www.smarty.net/docsv2/en/langua ... ion.if.tpl