Find Jobs
Hire Freelancers

Modify Drupal template.php for additional node author menu link

$10-30 USD

Closed
Posted over 6 years ago

$10-30 USD

Paid on delivery
Hi, I already have a menu link (node edit) which is only shown to the node author realised in the [login to view URL] (code below) and the given menu link path "http://edit/this/node". I would like to have the same for the translate path (so "/node/' . $node->nid . '/translate") but I don't know how to edit the template.php. I guess it is quite simple for someone who knows PHP and Drupal a bit ;) function venture_theme_menu_tree($variables) { //global $node; $arg = arg(1); $html = null; if ($arg) { $node = node_load($arg); if ($node) { $link = '/node/' . $node->nid . '/edit'; $html = '<ul class="menu">' . str_replace('http://edit/this/node', $link, $variables['tree']) . '</ul>'; } } if (!$html) { $html = '<ul class="menu">' . str_replace('first ', 'first hidden ', $variables['tree']) . '</ul>'; } return $html; }
Project ID: 15687576

About the project

13 proposals
Remote project
Active 6 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
13 freelancers are bidding on average $34 USD for this job
User Avatar
Hello, I'm a PHP/Drupal/WordPress CERTIFIED EXPERT coder. And have a lot of experience with System admin + Html + Javascript + CSS + API integration Relevant Skills and Experience Please have a look at my Portfolio and client's feedback here for the projects completed. https://www.freelancer.com/u/minhhoangduc.html?pvpReviewLink=true Proposed Milestones $30 USD - Delivery milestone Please let me help you do it. Best Regards, Minh H
$30 USD in 1 day
4.9 (660 reviews)
8.5
8.5
User Avatar
We are a group of electrical engineers and web developers. It is unclear what you are trying to do but we understand the portion of code you provided and we might be able to help if you elaborate. Relevant Skills and Experience We have 9+ years of experience in various programming languages as well as system administration and network engineering. Proposed Milestones $30 USD - Entire Project
$30 USD in 1 day
5.0 (124 reviews)
6.8
6.8
User Avatar
Hi i understand the project. Relevant Skills and Experience i have good knowledge on Drupal, Javascript, PHP Proposed Milestones $5 USD - milestone $25 USD - all scope items
$30 USD in 1 day
4.9 (31 reviews)
6.5
6.5
User Avatar
Hi, i have read your post and seen code you have written and good code. i am able to do this job very quick with the use of Drupal hooks for translation. Relevant Skills and Experience I have total 8 years of experience in drupal development for Backend and Frontend development. i have also contributed modules and themes to Drupal also. you can view my profile for reviews. Proposed Milestones $19 USD - After complete project
$19 USD in 1 day
4.5 (38 reviews)
5.7
5.7
User Avatar
I am zend certified php developer and having 12 year of experience. Relevant Skills and Experience I have experience in drupal 6, 7 & 8 version. So I can do this quickly. Proposed Milestones $25 USD - entire task
$25 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
You can add another rule for the string replacement, which would replace any occurrence of a specific string, like http://translate/this/node to '/node/'. $node->nid. '/translate'. Then you can use the fake url anywhere in the menu, and it will be replaced with the correct one, just like the one you are using now for the edit link. Cheers, Călin
$15 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of GERMANY
Norderney, Germany
5.0
31
Member since Aug 17, 2011

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.