It would be nicer to provide such feature that allows administers using php code in primary links and secondary links in order to create dynamic links for different users or under different circumstances. For example, if a button called "login" is in the primary link, once an user logged in, the button should be replaced by "logout". Currently, we cannot implement this as only html is allowed for menu links.
Part of what I have done on my site is to:
1) modify the system_theme_settings function in system.module by adding
$group .= filter_form("$var][primary_links_format", $settings['primary_links_format']);
$group .= filter_form("$var][secondary_links_format", $settings['secondary_links_format']);
for primary links and secondary links respectively.
2) modify the xtemplate_page function in themes/engines/xtemplate/xtemplate.engine file
according to the changes made in system.module.
I am expecting this feature can be added into Druapl 4.7 and a better solution can be provided by more intelligent developers.
Comments
Comment #1
dimmer commentedYes, I agree that this would be a useful feature.
Comment #2
sangamreddi commented+1 from my side. an essential feature missing.
Comment #3
genwolf commentedI need the same functionality - and I have made themodifications to system.module as sugested, but I can't see where or what needs to be changed in xtemplate.engine, The xtemplate_page function has a number of calls and I can't see where it deals with the updating of the primary links let alone their retreival. In fact I can't see where the Primary and secondary links even get stored - the variables table contains the strings for site slogan and title and mission is easy to find, where the hell do the primary and secondary links get stored , and why does it have to be seperate from everything else?
Comment #4
chx commented