Posts: 1,247
Threads: 82
Joined: Feb 2011
I was using
Code:
<?php getPageContent('slug'); ?>
for site content from a specific page when converting a Maintenance-template to GetSimple. But when I used
Code:
<?php get_page_title(); ?>
I got off course the site-title. But what I want is the title of that specific maintenance page. How do I do that?
Posts: 3,491
Threads: 106
Joined: Mar 2010
Code:
<?php getPageField('slug','title'); ?>
Posts: 1,247
Threads: 82
Joined: Feb 2011
2014-01-16, 05:44:51
(This post was last modified: 2014-01-16, 05:49:30 by datiswous.)
(2014-01-16, 05:38:32)Carlos Wrote: Code:
<?php getPageField('slug','title'); ?>
Thanks!
Are there more functions for php getPageField ? Then they can be added here:
http://get-simple.info/wiki/theme:templa...e_snippets
Posts: 423
Threads: 15
Joined: Mar 2011
(2014-01-16, 05:44:51)datiswous Wrote: Are there more functions for php getPageField ?
http://get-simple.info/wiki/config:caching-function
--
Nick.
Posts: 3,491
Threads: 106
Joined: Mar 2010
2014-01-20, 05:58:15
(This post was last modified: 2014-01-20, 06:16:08 by Carlos.)
I'd rather like that these functions (getPageContent, getPageField, etc., available since GS 3.1) were not camelCase, but lowercase with underscores, to be consistent with the other template tags.
If it wasn't because get_page_content, etc. already have an optional parameter ($echo), I would suggest that they had it but for the slug of other page.
An alternative could be an equivalent, like get_other_page_content, get_a_page_content or something (that actually would be an alias for getPageContent)
(BTW ages ago, before caching functions were available, I started working on a plugin to add these, though I called them that_page_content, etc.)
Posts: 6,266
Threads: 181
Joined: Sep 2011
Yes all the cache functions will get theme function aliases when I finish rewriting cache.
Please add your suggestions to the github case for refactor cache