bright-cloud-studio/add-user-fields

Adds two custom user fields, image and bio, so they can be displayed on News posts and elsewhere

0.2.6 2022-03-31 19:36 UTC

This package is auto-updated.

Last update: 2024-04-17 16:21:19 UTC


README

Adds two custom user fields, "User Image" and "User Bio", which can be added to templates using custom tags. Add into news templates with a dynamic id to display an author's image and bio on posts or put in a static id to display a specific user's image and/or bio anywhere you'd like.

  • On the "Edit User" page is a new section containing our two custom fields.

Example Image 1

  • On any template, for this example I'm using "news_full.html5", add the custom tags "{{user_image::id}}" and "{{user_bio::id}}" to display them, making sure to replace id with the User's id.

Example Image 2

For this example we wanted to add an author's image and bio to news posts so $author_id is obtained using \NewsModel::findByAlias but you can use them anywhere as long as you add a valid user id

  • Can be styled using the "user_image" and "user_bio" class and id.