Hello all,

This is such a great mod. This is just what I needed & it settled in smoothly.

Just one usability question - I will like to change the existing 'Apply for this Job link' (at the bottom of the job posting) to a button & also add the same button on top of the job posting so that this is clearly noticeable to the site visitors.

I am not a coder, but I guess something on the lines of the following in a block should do the trick, but I can't figure out how to call the node id as part of the url (/job/apply/nid) for the button action:


Thanks once again for this great module.

Comments

newdru08’s picture

Sorry the code didnt get posted above:

       <form>
        <input type="button" onClick="job/apply/nid" value="Apply for this Job">
      </form>
kbahey’s picture

Category: support » feature

You can do some of that via http://api.drupal.org/api/function/hook_link_alter/5 and check for $links['job_apply'], and change its content.

xamount’s picture

I did this by created a node-[insert_your_job_type_here].tpl.php

Then I wanted to display a big button instead of a job apply link so I did this:

<?php
print '<div class = "apply-logo">'.l('<img src = "'.base_path().path_to_theme().'/images/button.png" alt = "apply now" width="110"/>','job/apply/'.$node->nid, array(), null, null, false, $html = true).'</div>';
?>
xamount’s picture

Status: Active » Closed (fixed)

closing this issue. Please re-open if you still have questions.

pvisser’s picture

Can you eplain how i do this :

I have this
// already authenticated user
if ($user->uid != 0) {
$variables['joblink'] = l(t('Submit an application'), 'job/application/node/'
. $variables['node']->nid);
}

How can i insert a button instead

Thank you

pvisser’s picture

Can you eplain how i do this :

I have this
// already authenticated user
if ($user->uid != 0) {
$variables['joblink'] = l(t('Submit an application'), 'job/application/node/'
. $variables['node']->nid);
}

How can i insert a button instead

Thank you

s13’s picture

@pvisser

I'm not sure but the following replacement should work:

Replace:

if ($user->uid != 0) {
$variables['joblink'] = l(t('Submit an application'), 'job/application/node/'
. $variables['node']->nid);
}

with:

if ($user->uid != 0) {
$variables['joblink'] = 'nid).' value="Apply for this Job">';
}

s13’s picture

sorry use this instead:

Replace:

if ($user->uid != 0) {
$variables['joblink'] = l(t('Submit an application'), 'job/application/node/'. $variables['node']->nid);
}

with:

if ($user->uid != 0) {
$variables['joblink'] = '<input type="button" onClick="job/application/node/"'. $variables['node']->nid).' value="Apply for this Job">';
}