forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: rlm on November 03, 2004, 06:19:43 pm

Title: Separating USER_ADMIN_MENU and ADMIN_MENU template blocks
Post by: rlm on November 03, 2004, 06:19:43 pm
hi,

on my theme's template.html i made room for 2 different admin menu sections (or blocks):



this would be ok (since they do not appear at once), but for the fact that i wish to present them differently and in different locations of the template.html page:

i need to separate the building blocks for these menus in the theme file and have different placeholders for them in the template file. Because they are to be presented differently, they are compiled separately in theme.php. They have different (html table) structures, sizes and styles. Having one placeholder for both menu types simply does not work for me.

Put simply, I want to have something like this in the template.html file:

Code: [Select]
<td>
  <!-- start of admin menu -->
{ADMIN_MENU}
  <!-- end of admin menu -->
</td> 

(and later, in a completely different section of the template's HTML table)

Code: [Select]
<tr>
  <!-- start of user admin menu -->
{USER_ADMIN_MENU}
  <!-- start of user admin menu -->
</tr>

who can help? ::)


many thanks.

richard


Title: Re: Separating USER_ADMIN_MENU and ADMIN_MENU template blocks
Post by: Casper on November 04, 2004, 07:40:28 pm
You need to add it to this array in theme.php;

Code: [Select]
$template_vars = array('{LANG_DIR}' => $lang_text_dir,
        '{TITLE}' => $CONFIG['gallery_name'] . ' - ' . $section,
        '{CHARSET}' => $charset,
        '{META}' => $meta,
        '{GAL_NAME}' => $CONFIG['gallery_name'],
        '{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
        '{MAIN_MENU}' => theme_main_menu(),
        '{ADMIN_MENU}' => theme_admin_mode_menu(),

So you would want to add something like;

Code: [Select]
'{USER_ADMIN_MENU}' => theme_user_admin_menu(),
Please report if this works.
Title: Re: Separating USER_ADMIN_MENU and ADMIN_MENU template blocks
Post by: rlm on November 05, 2004, 12:28:23 pm
solved, many thanks.