Comments (2)
@crochefort Actually I do something similar on the website I manage.
On my site I separate the "boilerplate" from the "content" file. The boilerplate makes all the required variant includes and sets all the required variables $_PAGE['lang1'],
I have a strict file structure and naming scheme where content files are always in an "includes/" folder in the same directory as the boilerplate. Then I use PHP to get the last modified date of the content file, if it exists, as once a page is setup I rarely change the boilerplate.
if( file_exists($_PAGE['content']) ) {
$_PAGE['modified'] = date ("Y-m-d", filemtime($_PAGE['content']));
} else {
$_PAGE['modified'] = date ("Y-m-d", getlastmod());
}
I didn't include the method in the variant because I wasn't sure if it could be considered a good standard method of acquiring the last modified date, I figured some people might like to keep content and boilerplate in the same file while others might do what I do and have them separated.
I'm all for adding the method to the demos-php files if it's a desirable feature. You're also free to do what I did and create your own template files that have the required includes and variables and implement the last modified feature for your specific site.
from wet-boew-php.
The Last Modified should reflect the date that the content was changed, which usually isn't related to the filesystem timestamp. There is a built in worker that will update the bottom of the page values as long as the meta tags are up to date.
from wet-boew-php.
Related Issues (20)
- remove links on footer menu headers HOT 1
- Maintenance Mode... HOT 2
- PHP Menu Generator HOT 18
- Links in header need to be updated HOT 9
- V4 missing error page coding. HOT 10
- V4 Archived page don't show ARCHIVED - in the title HOT 2
- V4 Archived text need to be updated
- Cloning just the DIST-PHP folder instead of the whole project HOT 8
- GOC Template user how do you... HOT 2
- V4 New issue found while validating with WPSS HOT 2
- WET4 changes that need to be take care! HOT 5
- wet-boew-php as bower dependency HOT 9
- wet-boew-php 4.0 HOT 11
- The Secondary Utility Menu Page - side menu doesn't work. HOT 3
- Base theme footer background is the wrong colour HOT 6
- Title is just a slash on language selection splash page of on demos-php HOT 7
- FIP images missing on 404 server pages in demos-php site HOT 6
- WET 4 - Missing support for session login/logout (sign in/sign out) HOT 3
- Please tag v4.0 branch HOT 2
- GCWeb Canada.ca Redesign theme HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wet-boew-php.