Home

Login / Register

My Menu

Links

Identifying and Formatting Current URL from Within Custom Menu in Drupal.

The code snippet about creating a custom php code based link menu shown in tutorial at http://www.dashplanet.com/webmasters/drupal-cms/customizing-the-drupal-l... does well to let us know how to generate a custom php code based menu. This tutorial adds to it, it teaches us how to identify and then apply custom formatting to the current/active url.

Consider a scenario where you want to highlight the pages/url which is currently loaded. There can be many ways of doing this. More controlled and reliable way is described below. If you have read the tutorial at http://www.dashplanet.com/webmasters/drupal-cms/customizing-the-drupal-l... then observe the additions this tutorial makes.

"CurrentURL()" returns current url and I just added an if condition before printing out each of the links that if current url matches then add span around the link title so that we can apply some class to it.

Note 1: You will notice I have checked both url structures e.g. with and without 'www' prefix because in most of the cases you will not have handled to redirect your requests to either with 'www' or without so its good to check them both.

Note 2: You will also notice that instead of just adding a class to existing a or li tags I have wrapped the link title in span and applied a css class because otherwise it can be overridden by your existing css styles that you might have applied to all the li tags such as no background so spanning ensures that your formatting/styling works just as you want.

Customizing the Drupal Login Block as Horizontal Bar and Adding Links

Drupal Menu system is great indeed but it lacks support for arguments and links based on some custom php logic. Consider a scenario when you want to create a facebook style login bar that when logged out displays a facebook type horizontal login bar with username and password fields and after logged in, displays primary links including a link to current user and logout.

Follow the steps and you will get something like that working.

1- Create a block with following code and php code as input filter:

Spy Cam / CCTV Surveillance systems, Video Surveillance

When talking of spy cams, one of the initial things that you would perhaps consider is James Bond films, possibly even conspiracy movies when you possess a mind that entertains such thoughts. Yet needless to say, they're not as out-of-this-world as Hollywood makes them to be. They're only surveillance cameras that are smaller than what we commonly notice. As a matter of fact, spy cams aren't meant to be noticed. That's why they're commonly little then put in casings made to look like the dullest objects such as ballpens, watches, lipsticks, sunglasses, even buttons.

Ten Important Steps to a Winning Website Home Page

There's no doubt about it - the first page your site visitors see is the most important page of your website. If your home page isn't appealing, chances are the rest of your pages will never even be seen by your visitors. It helps to think of your home page as the "front door" to your online business. Will it invite people to come in and look around, or persuade them to take their dollars elsewhere? Here are ten tips for making your home page a winner:

1) Don't keep them waiting.
Obey the "Eight Second Rule" (the one that says your Web page should load in eight seconds or less even over slower modems). Otherwise the viewer will probably lose patience and click the "stop" button.

2) Identify yourself.

Few Tips on Better Financial Planning

Financial planning at an early age may seem complicated, however it can be easier than you might think. At the age of 25 most of us are just beginning our married life, and there are homes and automobiles to buy and children to plan for. This leaves little time to plan for the future. These are some simple steps that you can take to ensure that you and your family will be able to handle unexpected emergencies and expenses.

Buy Insurance

Insurance is one of the easiest ways that you can be sure that your family is protected financially in the event of an accident. Medical bills alone from one accident can cause a family to be in a state of financial distress for years. Although medical and automobile insurance rates are high, the return is much greater. Life insurance is also a very key factor in planning for your financial stability. In the event that a family member dies, you could be in debt for as much as $50,000 for funeral expenses. Insurance may seem like a useless expense when a family is deciding on a budget, however, the budget will be completely diminished in the event of an accident without insurance. Remember, the key word in the phrase "financial planning" is planning.

Repay High Interest Loans

Some debt that is incurred has a higher interest rate than others depending on the type of loan and the time at which the money was borrowed. Many times car loans and student loans have the highest interest rates, while other debts like medical bills may have little or no interest accumulating. Although it might seem like a good idea to pay off bills that have a lower total balance to eliminate that payment, this is not always the best option. In the long run it is more beneficial to pay off the debts that have the highest interest rates first.

Recent Members

adrianA
adrianA's picture
Oresti
Oresti's picture
anglicansincebirth
anglicansincebirth's picture
MarthaEdwards
MarthaEdwards's picture
ani
ani's picture
DesertFox_Davor
DesertFox_Davor's picture