2

Have the following code

 $links = array_merge($links, array( l(t('Administration pages'), 'admin'), l(t('Front page'), '<front>'), )); } $output = theme('item_list', array('items' => $links, 'title' => t('Next steps'))); 

It does <ul> html list. My goal is to override, for example, "admin" path on given page from my custom module. Since it's themed output, I can use hook_theme_registry_alter() to override the theme function. But seems I can't do that dynamically (because of cache).

Is it wise solution to copy whole theme_item_list function, rename it to my_theme_item_list and write there my own path logic?

Another solution?

1 Answer 1

1

I think you can do anything you could do in my_theme_item_list in a preprocess function. You can do this in your template.php file with a function like:

function mythemename_preprocess_item_list(&$vars) { // Change things here } 
0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.