Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable promotion page, "swiss army knife" #631

Closed
wants to merge 14 commits into from

Conversation

breakdancingcat
Copy link
Member

@breakdancingcat breakdancingcat commented Jun 29, 2023

Goal

A template that displays a single promotion group (dynamic content) as either a list, a grid, or either of those grouped by their selected option. This is made possible using one page field with JSON and the parameters outlined below.

Preview

List view, not grouped List view, grouped
image image
Grid view, not grouped Grid view, grouped
image image

Configuration

  • Select template "Promo Page."
  • Select Custom page field promoPage.
  • Paste this JSON array into the page field and edit the values to configure the page:
    {
    "id":00000,
    "config":"randomize|limit:60|page_id",
    "columns":4,
    "singlePromoView":"true",
    "showExcerpt":"false",
    "showDescription":"true"
    }
    
    Param Usage
    id Promo group ID. Required.
    config Promo group config, pipe delimited. Use 'page_id' for per-page items. Optional.
    columns 2, 3, or 4. Default/unset is 1, a list. Optional.
    singlePromoview True or false. False(default) will enable the promotion's link field. Optional.
    showExcerpt True or false. True is default. Optional.
    showDescription  True or false. True is default. Optional.
  • Notes

    For compatibility with older versions, the page fields "listing_promo_group_id" and "grid_promo_group_id" still function, but they are not configurable to set the number of columns, individual promo view, or the ability to show/hide excerpt and description.

    @breakdancingcat breakdancingcat requested a review from a team as a code owner June 29, 2023 16:16
    @breakdancingcat breakdancingcat temporarily deployed to build June 29, 2023 16:16 — with GitHub Actions Inactive
    @breakdancingcat breakdancingcat changed the title yout\Feature/promopage Feature/promopage Jun 29, 2023
    @breakdancingcat breakdancingcat changed the base branch from master to develop June 29, 2023 16:17
    @breakdancingcat breakdancingcat changed the title Feature/promopage Configurable promotion page, "swiss army knife" Jun 29, 2023
    @coveralls
    Copy link

    coveralls commented Jun 29, 2023

    Coverage Status

    coverage: 99.129% (+0.05%) from 99.084% when pulling 9347824 on feature/promopage into 3339f82 on develop.

    @breakdancingcat breakdancingcat temporarily deployed to build June 30, 2023 18:20 — with GitHub Actions Inactive
    @breakdancingcat breakdancingcat temporarily deployed to build June 30, 2023 18:21 — with GitHub Actions Inactive
    @tomkrupka tomkrupka self-assigned this Jun 30, 2023
    @tomkrupka
    Copy link
    Contributor

    Looks good to me!

    Copy link
    Member

    @nickdenardis nickdenardis left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    👍 Looks great

    @breakdancingcat breakdancingcat temporarily deployed to build July 1, 2023 02:50 — with GitHub Actions Inactive
    @breakdancingcat breakdancingcat deleted the feature/promopage branch July 1, 2023 02:56
    @breakdancingcat breakdancingcat mentioned this pull request Jul 28, 2023
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    None yet

    4 participants