1

Topic: Add functions?

Is it possible to implement 2 new functions?
- website name
- website slogan
It could be interesting to add these possibilities when there's a new Wolf install...

My Wolf CMS website (not finished)
http://wolfcms.office-web.net/

Thumbs up

Re: Add functions?

Why use functions for this? Why not just use a snippet, page part (on the Home Page) or even just put them in the Layout?

Wolf CMS founder and lead developer
Please always check the Support forums and Wiki before asking. (My Ohloh account.)
Like Wolf CMS? Consider making a financial contribution.

3

Re: Add functions?

Since these are items that would not change (or not much?) once a site is built, my sense too is that they don't need a "function".

But having said that, at least you could use the "Admin site title" field in Administration > Settings for this ... if you wanted to! IF the {title in your admin} == {title of your site}, then

<?php echo Setting::get('admin_title'); ?>

can be used to put it anywhere you want in the frontend, too.

FWIW!

4

Re: Add functions?

mvdkleijn wrote:

Why use functions for this? Why not just use a snippet, page part (on the Home Page) or even just put them in the Layout?

For new users it could be interesting to add this in layouts/templates (automated copyrights...). So, peoples who made new templates can add these variables...

David wrote:

Since these are items that would not change (or not much?) once a site is built, my sense too is that they don't need a "function".

But having said that, at least you could use the "Admin site title" field in Administration > Settings for this ... if you wanted to! IF the {title in your admin} == {title of your site}, then

<?php echo Setting::get('admin_title'); ?>

can be used to put it anywhere you want in the frontend, too.

FWIW!

I'll test that!

My Wolf CMS website (not finished)
http://wolfcms.office-web.net/

Thumbs up

5

Re: Add functions?

<?php echo Setting::get('admin_title'); ?>

works well...

Is there something like that for the administrator email?
Found...

<?php echo Setting::get('admin_email'); ?>

Last edited by oweb (2010-03-01 14:35)

My Wolf CMS website (not finished)
http://wolfcms.office-web.net/

Thumbs up