General Discussion

Showing the blog post author name

Selezen ·
Hi there.

I'm trying to set up Schlix for the first time, and I'm loving the customisability and relative ease of use compared to other CMS tools.

However, I can't get any part of the blog system to show the name of the author who posted the blog. All the options in Blog configuration show a tick in "Display created by" and I've even tried ticking the "Display modified by" options with no luck.

Can you help please?

prana ·
Hi Selezen,

I'm glad that you enjoy it. To display the author name, the options are defined under the [Options] tab. The ones that you saw under the Blog or Web Pages configuration are applicable when you create a new item and/or if you want to reset the options by clicking "Reset all item options". The options can be customized per item/category.

1. Item Options
Sample: https://demo3.schlix.com/news/lifestyle/cosmopolitan/what-is-lorem-ipsum.html - at the bottom, it shows the author and a link to the user profile
You can toggle this by clicking the "Display created by" checkbox under Options - Item Options (screenshot: cms_item_options_1.jpg) when you edit the item (blog/webpage).

2. Category Options
We usually turn this off, but you can also turn it on when you click Edit Category/Edit Current Category
Sample: see screenshot cms_category_child_item_listing_options_1.jpg

3. To customize it further, click Macros - displayarticlemeta
See screenshot - macro_manager_display_createdby.jpg

Please let me know if you need more info or if you found a bug in these options.

Thanks
prana

Selezen ·
Sorted, brilliant - thank you.

The macro was disabled

Selezen ·
Apologies for the follow on question - is there any way to show the same details (creator name) and configure the dates on the "latestblog" blocks?

prana ·
Hi Selezen,

Although currently there's no built-in options in the config to show the author name, you can still do this by copying /system/blocks/latestblog/view.latestblog.template.php to /web/{sitename}/themes/{themename}/blocks/latestblog/view.latestblog.template.php (e.g. /web/main/themes/companyprofile/blocks/latestblog/view.latestblog.template.php) as seen in the attached screenshot where_to_copy_view_template.jpg and modify it. For more info: https://www.schlix.com/documentation/v2/web-development/view-templates-customization.html

I've attached the PHP file so you can use it right away. The modification is shown on the attached screenshot: modification_of_view_template.jpg.

Note - the ___h(.....) function is just a shortcut of htmlentities(....)

Let me know if you need further help