I have designed a custom theme and I need to be able to load a module I have made into my default.html page. I have written the following so far:
<div id="outer-content">
<div id="content">
{{ template:body }}
</div>
</div>
What do I replace {{ template:body }} with in order to display a custom module?
Maybe this will help.
In your theme, save your default.html file with the same name as your module. For example, you can create a custom layout file for the blog and save it as blog.html. When the module gets called it uses the layout file with the same name as your module.
If thats not an answer for you try posting on the PyroCMS Modules forum.
Related
Laravel how can I use the require file when using #section('content') method, how can I require the file into the this?
I want to using the menu bar, but I don't know how to separate it.
I have this code
<div class="links">
About Me
Employment History
News
Blog
Nova
Forge
Vapor
GitHub
</div>
can independent to menu.php
Make menu.blade.php with this code in your views directory.
In place of code write #include('menu')
If location of file is different then #include('path-to-file') will be loaded.
In Laravel blade you can use #include('file path')
You can use yield() to solve the problem.
so there is this project iam working on..now i want to add a background image at the login page....i have tried to upload the photo on the public/background folder...then in the css file i have created the directory but so far no changes!!
now my project look like below ..i have uploaded an image named backgroung.jpg on background folder but also in public/background and /public_html/vendors/gauge.js/assets then at my css file html {
background_image:url('public/background/background.jpg')} so far no changes
accountant
app
background
bootstrap
build
config
css
customer
database
employee
garage
garragelogo
general_setting
img
js
.
.
.
html {
background_image:url('public/background/background.jpg')}
i expected a lot i guess help please ......
You need to specify your path relatively like this ../../../public/background/background.jpg which ../ is a backward directory
or you can set your background in your html tag like this
<html style="background: {{ asset('background/background.jpg') }}">
hope it helps
Use this code block for setting background image on any page.
<div class="classToDefineBackgroundSetCss" style="background-image: url('{{asset('assets/bg-slider/bg-slider1.jpg')}}');">
<form>
<!-- LOGIN FORM -->
</form>
</div>
#extends('layout/layout.blade.php')
Having layout.blade.php it contains css,js. and have to link with index.blade.php. i tried #extends('layout.layout'), is not working.
You can use;
src="{{ asset('path/css or js') }}"
I am new to laravel so I am not sure how this can be achieved. I am using ZURB Foundation and trying to create a button in the page.
I use linkRoute always to redirect to a named route then redirect to a specific controller action. I have the below:
<body >
<h1 align="center">ShopCon.com</h1><br><br>
<a style="margin-left:50px;" href="{{ HTML::linkRoute('membersaccess', 'Members Access') }}" class="medium success button">Login or Register</a>
</body>
but when I render this, it shows like this
Members Access" class="medium success button">Login or Register
instead of showing the button and text within it and link to named route. How can this be fixed? I read something about macros but unable to clearly understand them or use them to achieve this.
Picture included for reference:
HTML::linkRoute produces an HTML anchor tag.
Since you only want the URL, use URL::route.
Not sure if this a PyroCMS 2.2.3 bug, but everytime I use {{ template:body }} on my default.html seems that it always add this <h2>Page Title Here</h2>. I already checked on the admin via "Content > Pages > Page types > Edit > Page Content" and I don't see any tags that I placed in there. How can I get rid of it?
This is not a bug. This is how it works. From v2.2 they have changed the page layouts and it works like this.
Your template files control the main layout of the page (default.php, etc)
Then at the Pages, you can make use of "page types", each page type can use any of your template files to replace it's contents with {{ template:body }}
Now, you can write down your page layout via admin panel Pages -> Page types-> Edit -> Layout tab which as default there is a h2 tag for title there.
<h2>{{ page:title }}</h2>
{{ body }}
This gives you the flexibility to use any kind of custom field for any of your page types.
So, simply edit the layout of the page type you are using and manage how you want to arrange contents via your *page layout*s.
I hope I could make it clear for you :)