Jump to content

help to add theme setting


LoveHate
 Share

Recommended Posts

hi

I wanna add a select box setting in my theme so I use below code:

<?php

return new \IPS\Helpers\Form\Select("core_theme_setting_title_{$row['sc_id']}", $value ? explode(',', $value) : array(), false, array( 'options' => array (
  'activity' => 'Activity', 
  'forumtopic' => 'Forums',  
  'pages' => 'Pages', 
  'downloads' => 'Downloads', 
  'message' => 'message',
  'posts' => 'posts',
  'topics' => 'topics',
  ), 'parse' => 'normal', 'multiple' => true, 'unlimited' => '*', 'unlimitedLang' => 'all_items' ), NULL, NULL, NULL, 'theme_setting_' . $row['sc_key'] );

and use below codes in theme editor;

{{if theme.profile_items == 'activity'}} 
<!--activity-->
{{endif}} 
{{if theme.profile_items == 'forumtopic'}} 
<!--forumtopic-->
{{endif}} 
{{if theme.profile_items == 'pages'}} 
<!--pages-->
{{endif}} 
{{if theme.profile_items == 'downloads'}} 
<!--downloads-->
{{endif}} 
{{if theme.profile_items == 'message'}} 
<!--message-->
{{endif}} 
{{if theme.profile_items == 'posts'}} 
<!--posts-->
{{endif}} 
{{if theme.profile_items == 'topics'}}
<!--topics-->
{{endif}}

but when I select one item it's displayed at front but when I select more than one nothing is displayed.

 

what's the problem?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

By using our site you agree to our Privacy Policy