And it begins
So it seems Drupal is just as convoluted as any other CMS system. Between the endless function-following and various other non-standard (read: not a way I would do it, but probably more standard than my way) ways to configure variables, I have finally found a way to get that damned Home link on the primary links without setting a database entry.
It took me about 3 hours to filter through the structure of Drupal's core modules. I first went to the themes folder and found the location where Primary Links (About Us right now) is filled in. That led me to the theme() function. I then obviously went to theme.inc in the includes folder because it would make sense for the theme() function to be there. There I found a massive function that all hooks pass through, so now I was at a loss.
Half an hour later, I somehow found a $primary_links variable in that file and tried to modify it before returning to the theme() function somewhere in the call stack but it turned out to apply to every links list call, so that was no good. Filtering down more (and with some help from the function, grep -C 3 -r I finally found the function I needed to modify to just get the Primary Links list.
For future reference it is located at line 1214 of 2474 in the menu.inc (looking back, that makes sense now). Its in the menu_primary_links() function. (Who knew?).
The code was:
The code now looks like:
Recent blog posts
- Quick Memory Improvement for Firefox
- Canned VirtualPC Instances for IE 6, 7, 8 on XP/Vista
- Checking assembly dependencies for .NET
- Google's Public DNS
- Server Utility Functions for Non-Web Apps
- reCAPTCHA for ASP.NET MVC that uses ModelState
- Adding a container to ValidationSummary helper in ASP.NET MVC
- Generic XML Serialization Class
- Re-throwing Exceptions in C# with InternalPreserveStackTrace
- Solving xsd generation error: 'The element .... is missing'
Recent comments
7 weeks 4 days ago
24 weeks 1 day ago
27 weeks 2 days ago
30 weeks 3 days ago
36 weeks 1 day ago
46 weeks 14 hours ago
1 year 30 weeks ago
1 year 47 weeks ago
1 year 47 weeks ago
2 years 2 weeks ago