Documentation • Knowledge Base

Post Attachments

Table of Contents

Documentation • Knowledge Base

Upload Post Attachments

Changes the upload path to new directory

When uploading a file/document to a new post, changes the default upload url & path to a custom folder directory.

$path_info['path'] = '/resources/knowledge-exchange/uploads/'

Usage

Path Url

Example: Directly access a post attachment by url and post name.

Structure

Example

Rename Post Attachments

Changes the file name on upload

Before the post is created, the post attachment file/document is renamed.

$LastName_$FirstName_$ContactID_$PostTitle

Parameters

$LastName

(string) The current user’s or author’s Last Name.

$FirstName

(string) The current user’s or author’s First Name.

$ContactID

(int) The current user’s or author’s Wild Apricot Contact ID.

$PostTitle

(string) The post title for the new post to be published.

Usage

Template

Example: Renaming the post attachment file/document using a template.

Structure

Example

Preserves original File Extension.

Will not change or overwrite the original file extension. The template only affects the actual file/document name.

Updated: [post_updated_day]

Menu