watermark logo

接下来播放


Making Websites With October CMS - Part 29 - PHP block

0 观看次数
livecan
0
发布时间 14 Jan 2025 / 于 电影与动画

In this episode I'm going to show you how to use PHP block in your October CMS theme to create simple and complex queries and display them on your pages.

October CMS has three main parts of it's templates. Configuration block where information about your page is contained. Twig block where your markup goes, an the one we didn't talk about - PHP block.

And PHP block is used for just that, writing PHP at the start of your template. Which is very useful if you want to prepare some data before your page renders and then display it.

Usually this means that you would be making queries of varying complexity. I would compare this to something like Custom Queries in WordPress.

As you will see, this PHP block will help you a lot when making October CMS site.



### Code used in this video

https://goo.gl/JcDfKg

http://watch-learn.com/video-t....utorials/making-webs

显示更多
0 评论 sort 排序方式

接下来播放