Topic: write content with html and bootstrap classes
Is there a way for me to create pages and use bootstrap classes in html tags within my content? Thanks for any help offered!
Pages 1
Is there a way for me to create pages and use bootstrap classes in html tags within my content? Thanks for any help offered!
@jon9china
Hi there of course there is deppends on your layout design and on your Bootstraap version. But you sure can, if you are using the monstra.org 3.0.1 cms its already with version 3.0 Bootstraap but you may edit all layout and design to meet your needs.
Thanks for the reply. I should say I'm a bit of a newbie here. I need to ask exactly where I would paste the code for any such content that would include html. I see in the file structure, the content is in .txt files with some markup that I don't recognize. So where would I put the html content for one of these pages and have it rendered accordingly? Seems I can't just put it in the text window where pages are normally composed.
Thanks again!
@jon9china
Hi mate. In order to you to make the design as you wish and paste the code, you should follow this steps:
1 - Go to public/themes/yourtheme (open or create new folder)
2 - Open or create a file named as header.chunk.php and footer.chunk.php and index.template.php
3 - On the file header.chunk.php paste your desired code (normally its the tag and
So now you have 2 pieces, one to the top and other to the footer all you need now its to create a index file to place your contents inside.
4 - Open your index.template.php file and place inside this code:
// this calls your header file // this will output your cms contents // this calls your footer file
5 - Copy all your files under public/themes/yourtheme.
6 - Replace the filepath like this for all your files:
// echo Site::url will get your filespath
7 - Now lets create a menu for navigation:
8 - Open your backoffice and place contents inside and hit preview.
You should also read a bit about this template tags on: http://monstra.org/documentation/theme-template-tags.
There are many ways to create a template but this is the more easy one.
Oh, now I see, in fact I can enter html directly into the text box when composing pages and it renders. Alright, then. Seems my problem is solved!
Thanks, and nice product by the way. I like it because it's easy to get my head around the system and seems lightweight without extraneous stuff. It may be what I need!
@jon9china
Indeed it is my friend, you can do many things with monstra!
Thanks for the fast reply. This is very useful if and when I get into working with the theme!
btw looking forward to when the admin Reference bullet points on the documentation page might be filled out. That would also be useful for me in grasping 'snippets' and 'blocks', though I suspect with tooling around I should be able to figure it out myself.
Thanks,
Jon
@jon9china
Yes you can call up blocks and snippets easy... With php code or shortcodes on your pages only shortcodes works (if you are using monstra editor) but if you edit your files on a notepad or something you may call blocks and snippets to meet your needs.
for blocks
for snippets
So you can use for example...
Where would I place javascript that I might want to reuse on select pages?
@jon9china
I advise you to place on the footer.chunk.php file since it loads less your pages you may place as many as you wish only loads when you try to use them or call some action by the js files, so even if you dont use them they make you no harm at all, only at your disk space LOL
I see. Thanks for the generous responses!
@jon9china
You are more then welcome, enjoy Monstra
Pages 1