question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow Content Managers to Select which Template the Plugin will Use

See original GitHub issue

Description

Have “the plugin admin interface will allow content managers to select which template the plugin will use.” (source, bottom of document) to be a true statement, or document how and where and when the plugin admin interface will allow this.

Use cases

“content managers to select which template the plugin will use”

Proposed solution

Make “the plugin admin interface […] allow content managers to select which template the plugin will use.”

Alternatives

Document how/where/when “the plugin admin interface will allow content managers to select which template the plugin will use”.

Additional information

I could only change the templates used by the blog by manually typing a path into the “TEMPLATE PREFIX:”. I could not change the templates used by “select[ing] which template the plugin will use” in “the plugin admin interface”.

Admin Interface

djangocms_blog template path in admin interface

The path in this image does load templates from the directory specified (at …/templates/djangocms_blog/default).

settings.py

BLOG_PLUGIN_TEMPLATE_FOLDERS = (
    ('default', 'Default template'),    # i.e. `templates/djangocms_blog/default/`
    ('vertical', 'Vertical timeline'),  # i.e. `templates/djangocms_blog/vertical/`
)

I also, after adding these settings, ran python3 manage.py makemigrations and python3 manage.py migrate.

Expectation

A <select> dropdown menu form which I could select either “Default template” or “Vertical timeline”.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
wesleyboarcommented, Jun 25, 2020

I have tested the feature on my instance, by:

  1. installing the repo with the fix branch
  2. restarting the server
  3. ensuring each plugin loads select dropdown
  4. testing that select dropdown (on one plugin) does use the template from the selected plugin templates.

Edit: ✓ The test was successful!

1reaction
yakkycommented, Jun 24, 2020

@tacc-wbomar have a look at #605 for improved documentation regarding templates customization and feel free to suggest improvements

Read more comments on GitHub >

github_iconTop Results From Across the Web

My Content Management – WordPress plugin
Creates common custom post types for advanced content management: FAQ, Testimonials, people (staff, contributors, etc.), and others!
Read more >
Template overrides - WP Job Manager
Template files can be overridden via your theme should you wish to customise them. To override a template, move it to yourtheme/job_manager/ , ......
Read more >
Loadskin Plugin - DokuWiki
The plugin comes with an admin component you'll find in the admin menu. Use it to specify the templates to be used for...
Read more >
Configure Plugins in Vulnerability Management Scans
When you create and save a scan or user-defined template, it records all the plugins that are initially selected. When new plugins are...
Read more >
Using Template Files - Events Manager for WordPress
Events Manager uses templates from within the plugin folder to format things like ... We'll give you a common example, using the above...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found