Adding a CMS to Your Pyramid Web App Transcripts
Chapter: The Pages
Lecture: Concept: Real page content

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Well, there's a lot of build up to something that was actually pretty straightforward.
0:01 But again, we're going to start here and build and build and build. Here is how we're rendering the CMS page. We have a couple of things we're doing.
0:01 We want to set a "H1" header that has the title of the page and we want to show structured content that is HTML
0:01 that is not escaped and looks like eight small stores. But that actually makes it part of the page.
0:01 So we're gonna wrap that in a div just a partition and doesn't really have any effect I suppose.
0:01 When we say "structure:html" and that's gonna render that the one caveat. Remember that structure tag?
0:01 That means this cannot be used for user-generated content. Someone could come along and type some malicious code,
0:01 and you're just saying please put that malicious code right on my website. You don't want to do that, so remember.
0:01 people who edit this or have access to the CMS when is working like this must not be given. It must not be given to untrusted people, right?
0:01 So, in generally, the purpose of this site that's going to work great.
1:01 But I just want to really, really drive that home because I don't want you to get in trouble.
1:01 Have something go wrong with your site by not realizing what's happening here.
1:01 Well, this is basically what we also added a little special chameleon section that lets us inject the title into the top of the page as well.
1:01 And use that if you want, or you want the page to be the same.
1:01 Leave it alone for SEO and just use your navigability right for creating bookmarks and whatnot.
1:01 It's a good idea that explicitly set the proper title at the top of your page as well.
1:01 You can add that in. But here's the essence of what we did to render CMS pages within our site.
1:01 wrapped in the data driven stuff like the account log in status and so on.

Talk Python's Mastodon Michael Kennedy's Mastodon