Rapi::Blog::DB::Result::Post - Post row object
This is the default Post Result class/row object for Rapi::Blog. The list_posts() template directive returns an array of these objects (in the sub property rows), and when viewing a post via a view_wrapper the associated post is available as the template variable Post.
list_posts()
rows
view_wrapper
Post
This is a DBIx::Class::Row.
Auto-increment post id. Read-only.
The unique name of the Post. The name is used to generate the public URL for the post. Should contain only lower case alpha characters, dash and underscore.
Human-friendly Post title
CAS image column ('cas_img'). Contains the sha1 of a file within the SimpleCAS.
'cas_img'
The declared Date/Time of the Post. Defaults to the timestamp of when the Post is created but can be set to anything.
The real Date/Time the Post is created, read-only.
The Date/Time of the last modification of the Post, read-only.
The author of the Post, FK to Rapi::Blog::DB::Result::User object. author is a relationship, the underlying foreign-key column is author_id which is hidden.
author
author_id
The author defaults to the user creating the Post, but if the user is an admin they can select a different user.
admin
The creator of the Post, FK to Rapi::Blog::DB::Result::User object. creator is a relationship, the underlying foreign-key column is creator_id which is hidden. Read-only.
creator
creator_id
The last user who modified the Post, FK to Rapi::Blog::DB::Result::User object. updater is a relationship, the underlying foreign-key column is updater_id which is hidden. Read-only.
updater
updater_id
True or false bool value. Posts which are not published will not be listed in list_posts() and will return a 404 not found except for admins and the author of the Post.
admins
The Date/Time the Post was marked published or undef if the Post is not published. Read-only.
published
undef
The size in bytes of the body. Read-only.
body
List of tag names for the Post as a space-separated string, read-only. Tags are defined by specifying them in Twitter #hashtag format in the Post body.
#hashtag
The summary for the Post which is either set from custom_summary or auto-generated from the body. Read-only.
custom_summary
Custom summary for the Post. Setting any nonzero-length value will populate as the summary, while an empty string will cause summary to be auto-generated.
summary
The main content body of the Post in HTML/Markdown format.
Multi-relationship to all the Comments of this Post.
Multi-relationship to all the Hits of this Post. Hits record details of the HTTP request when record_hit is called from the view template.
record_hit
hits post_tags
Multi-relationship recording the tags of this Post.
List of tag names. Like tag_names but returns a list of strings rather than a single string.
tag_names
Returns the number of Categories this Post is in, which can be zero.
List of Category names (strings).
URL which can be used to access the image for the active site/scaffold.
image
URL path prefix to access the default public view of all Posts.
URL path prefix to access the default public view of this Post. This is just the public_url_path plus the name
public_url_path
name
URL path prefix to access the public preview of all Posts. By default this is the same as public_url_path unless the Scaffold has defined preview_path. The preview is used to display the post in an iframe on the internal post page. This is useful to be able to show the post without the full navigation of the site.
preview_path
URL path prefix to access the public preview of this Post. This is just the preview_url_path plus the name
preview_url_path
URL path to access the Post internally within the password-protected area of the site. This is the same page that opens if you double-click a Post from the Posts grid and is how you can edit a post. If the user is not logged in they will automatically be prompted to login.
Supports an optional mode argument which can be 'direct' or 'navable'. These are full-screen modes which will open the Post page without the full navigation tree and header. The 'direct' mode will be totally full-screen, while 'navable' will load a full-screen tabpanel which allows following links to related objects.
'direct'
'navable'
Called to record the current request in the Hits table for the post. Designed to be called from the default view path in the scaffold.
Util method returns true if the current user can delete the post. Will be true if the user is either an admin or or the author of the post.
Util method returns true if the current user can modify the post. Will be true if the user is either an admin or or the author of the post.
Util method returns true if the current user can change the author of the post. Will be true if the user is an admin.
Rapi::Blog
http://rapi.io/blog
Henry Van Styn <vanstyn@cpan.org>
This software is copyright (c) 2017 by IntelliTree Solutions llc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
2 POD Errors
The following errors were encountered while parsing the POD:
Unknown directive: =body
To install Rapi::Blog, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Rapi::Blog
CPAN shell
perl -MCPAN -e shell install Rapi::Blog
For more information on module installation, please visit the detailed CPAN module installation guide.