未加星标

Working with Perch

字体大小 | |
[开发(php) 所属分类 开发(php) | 发布者 店小二05 | 时间 2018 | 作者 红领巾 ] 0人收藏点击收藏

I love working with Perch CMS and it's a very flexible and powerful system. Here's my Perch workflow and a few of my favourite things about working with it.

Layouts and pages

On a new site build, I build a static page(s) first. Once I have 2-3 pages (or sometimes only a single page), I add Perch layouts for common elements, for example <head> , <footer> , navigation menus etc. I might have .html files at the start of the process but I change to .php when adding Perch layouts. The .html pages are kept if I think I need them as a reference.

The Perch layouts are just static HTML at the start. I'm really just using Perch layouts likephp includes at this point. For example, for site navigation, I have a static menu and I change to a Perch-driven menu later depending on the site requirements.

I might have a couple of Perch layouts for the <head> element because I like having a separate blog/news layout. I don't use layout variables much. Note to self: Maybe I should use them more.

Tip : Use page attributes to add canonical links into your pages for SEO purposes - as described by Simon Cox . Blocks

For site content, I use Perch Blocks as much as I can. For instance, on CVW Web Design , each page has a single "Page Content" region and this is assigned to a "Content - Blocks" template that has six items, for example "Text in Columns", "Heading and Strapline", "Content Row" etc. When adding content, I just choose different items for each page.

I want my pages to be a series of instructions

Each Block has all the mark-up needed to display that section of the page. I want my pages to be a series of instructions for PHP/Perch and this modular approach enables that.

Of course, for some clients, a page full of editable fields in Perch admin isn't the best approach and in these cases, I would separate out page content into separate regions.

Tip : Use template includes to make Blocks and templates easier to manage. Editors

I use Redactor most of the time because I've never been very keen to give clients an editor with Markdown. I'm not saying that clients won't/cannot learn Markdown but I just think this is another unknown for clients at the start of their CMS experience. And that's something I want to avoid.

I've used SimpleMDE editor on personal sites. I like it for my own use.

Perch admin

For Perch admin, I add a few custom styles similar to what Graham Street describes . I think this differentiates some areas of the admin better.

Apps

I use Blog and Forms apps the most. For the blog post page, I get the post data at the start of the page and add it into a $post variable that I can use anywhere on the page. This is different to the example post page that comes with the Perch blog add-on but it works better in many cases.

For third party apps, I like Chirp SEO and the Runway Backup Status Dashboard Widget

... and Perch Dashboard Links widget :-)

This is a short description of my Perch workflow. However, I hope it highlights a few things that will be useful for anyone working with Perch CMS.

Let me know in the comments (or write a post) about your Perch workflow.

本文开发(php)相关术语:php代码审计工具 php开发工程师 移动开发者大会 移动互联网开发 web开发工程师 软件开发流程 软件开发工程师

主题: PHPSEOHTMLHead
tags: Perch,page,use,my,For,pages,add
分页:12
转载请注明
本文标题:Working with Perch
本站链接:https://www.codesec.net/view/579588.html


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 开发(php) | 评论(0) | 阅读(37)