Ideally I would like to override individual blocks to say "By type", "By Color" etc. Instead of --Select-- when nothing is selected.
I'm not quite up to par with overriding functions in the templete.php file.
Can anybody help me?
Ideally I would like to override individual blocks to say "By type", "By Color" etc. Instead of --Select-- when nothing is selected.
I'm not quite up to par with overriding functions in the templete.php file.
Can anybody help me?
Comments
Comment #1
nagarajanl commentedYou can override this 'select' drop down options by using phptemplate_select() in template.php. The quickmenu uses the 'block-id' as a reference in this dropdowns. So you can make a switch case based on block-ids and override the null element by 'Color', 'Type' etc..
Comment #2
mcfilms commentednagarajanl I have this exact same issue. However, my PHP skills are puny.
I understand conceptually what you are saying about overriding the null element of the block-ids of the menus in template.php. Or at least I think I do. But when I go into my current theme's template.php file, I don't see a reference to the block-id.
Would it go inside here?:
There is a field to Override the default title for the block in my 'QUICK MENU: Availability' block
It says:
"Override the default title for the block. Use to display no title, or leave blank to use the default block title."
I wish there was a way to specify the use of the title in the drop down menu. I guess this is more of a feature request.
Thanks!
Comment #3
hankpalan.com commentedOk I'm rather stuck. Here is what I have so far:
I thought I knew what I'm doing but by the looks of it I'm in over my head. I have scoured the net but in reality my php skills are lacking.
Comment #4
mcfilms commentedEUREKA! I got it. Hopefully this will help someone else.
Open quickmenu.module in a text editor
Remove the line:
$options = array( '' => '-- Select --' );
The module will now default to using the first item in the menu list as the title.
(Wish this was documented somewhere.)
Comment #5
MorganG commentedGreat, thanks for this solution!
Comment #6
MantasK commentedI use:
you can use print_r($element) to check block id.