Theme option: Display text?

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Theme option: Display text?

Post by yellowled »

I'm working on a template which might require some user instructions. I have done this before, shipping a REAME file with the template, but you can never be sure people actually read it. So I was wondering if it's possible to display some instructional text in the theme options and how to do that.

YL
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Theme option: Display text?

Post by garvinhicking »

Hi!

You can use your own configuratm item for that. instead of giving the user a text input field, you can use the "custom" item type. The content itself is then emitted using the 'custom' item variable:

Code: Select all

$template_config = array(
  array(
        'var'           => 'infoxxx',
        'name'          => 'infoxxx,
        'type'          => 'custom',
        'custom'       => 'Read this! First! Now!'
  )
);
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Theme option: Display text?

Post by yellowled »

garvinhicking wrote:You can use your own configuratm item for that. instead of giving the user a text input field, you can use the "custom" item type.
Awesome, thanks. I'll definitely use that in templates to come, and I think other template designers should do that, too, if the template requires it.

YL
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

You should also be able to use type content:

Code: Select all

$template_config = array(
  array(
        'var'           => 'infoxxx',
        'name'          => 'infoxxx,
        'type'          => 'content',
        'custom'       => '<b>Read this! First! Now!</b>'
  )
); 
I don't know what the difference might be, but I always use content in my plugins.
Judebert
---
Website | Wishlist | PayPal
Post Reply