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

Multiple templates #4

Closed
stovepot opened this issue Mar 29, 2018 · 2 comments
Closed

Multiple templates #4

stovepot opened this issue Mar 29, 2018 · 2 comments

Comments

@stovepot
Copy link

Would it be possible to configure a campaign so it uses a (tabled) html template for the sendout, but it uses a different entry template to display to contents on the site. (Bootstrap responsive)

Could "Routes" provide a solution?

@putyourlightson
Copy link
Collaborator

putyourlightson commented Mar 30, 2018

You generally create a "view in browser" link in your campaign template, and you can link that to any URL, including your custom responsive template. In your template, you'll just have to fetch the correct campaign as follows:

// Assuming the campaign slug is in the second segment
{% set slug = craft.app.request.segment(2) %}
{% set campaign = craft.campaign.campaigns.slug(slug).one() %}

Or, as you suggest, using a route, you would just need the last line above. Make sense?

screen shot 2018-03-30 at 09 35 23

@putyourlightson
Copy link
Collaborator

Just wondering if this turned out to be a valid solution for your use case?

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

No branches or pull requests

1 participant