loogart / impact-canada

Canadian Government's Privy Council's Office Impact Canada website.
https://loogart.github.io/impact-canada/
0 stars 0 forks source link

WYSIWYG above h1 on basic and sub pages #66

Closed loogart closed 5 years ago

loogart commented 5 years ago

Hey @djsutter:

I want to be able to set the following look up for basic page: https://loogart.github.io/impact-canada/careers.html

meaning, i want to have flexibility to add html content above the h1 title (which is a mandatory field for basic pages). Is there a way to do this simply? i.e. either have an option to hide the default h1 title and create our own h1 OR have an option to enable a WYSIWYG block above the h1 title?

Let me know if you need additional clarification! Thanks!

djsutter commented 5 years ago

Probably easiest if we add a new text field to basic page which, if filled, can be rendered before the h1 title. Pretty sure we can do that. But we need to get through the config change which failed.

loogart commented 5 years ago

sounds good, looking forward to this.

djsutter commented 5 years ago

I spent quite a bit of time with this tonight. Things are so hard-wired that the title is ALWAYS the first thing displayed on a page. I can probably overcome this by manipulating the templates, but it may be easier if we have a new content type (other than basic page). Would that be ok? Suggested name?

loogart commented 5 years ago

@djsutter absolutely - if possible a fresh canvas. This would be a "freestyle page". I'd even go to say, remove the main container to allow full width content. This will allow flexibility to create custom pages for reports, top level pages, etc.

Let's go new content type.

djsutter commented 5 years ago

@loogart ok this sounds good, then we can leave existing content alone. Probably just need same as basic page - just a title and a body - and I will suppress the title from the display. The title would just be used for administration. If you want a title to render, you would add it to the body.

loogart commented 5 years ago

sounds like a plan @djsutter ! Let me know when I can test it out.

djsutter commented 5 years ago

I created a Freestyle Page here http://impact.qualivera.com/en/node/132 See if that does the trick.

loogart commented 5 years ago

@djsutter works like a charm! The only thing i would like to remove is the top margin class mrgn-tp-lg from the article element which is causing an extra top margin:

<article data-history-node-id="132" data-quickedit-entity-id="node/132" role="article" class="contextual-region mrgn-tp-lg freestyle-page full clearfix" about="/en/node/132" data-quickedit-entity-instance-id="0">

djsutter commented 5 years ago

Ok this is done now AND I put it in production. I didn't test it there, but expect it will work fine.