- Issue created by @achrafon
- 🇩🇪Germany D34dMan Hamburg
Hi @ drupaler99, could you please provide a screenshot of what and where you are trying to accomplish?
In case you are talking about the links on Dashboard, those are implemented (hardcoded) in module. They are not editable using Drupal's Admin interface. When the relevant module gets enabled, the links are automatically made available.
It is possible to override them using a preprocess function inside a custom theme. An example for this can be found in pm_kickstart_theme
https://git.drupalcode.org/project/pm_kickstart_theme/-/blob/7.x-3.x/tem...
function pm_kickstart_theme_preprocess_pm_dashboard_link(&$vars) { module_load_include('inc', 'pm', 'includes/pm.icon'); $link = $vars['link_blocks']; $vars['fa_icon'] = pm_helper_get_fa_icon($link['icon']); $vars['href'] = check_plain(url($link['path'])); $vars['href_add'] = FALSE; if (isset($link['add_type']) AND $link['add_type']) { $vars['href_add'] = url('node/add/' . check_plain($link['add_type'])); } elseif (isset($link['extra_link']) AND $link['extra_link']) { $vars['href_add'] = url($link['extra_link']); } }
- 🇲🇦Morocco achrafon
Hi @drupaler99,
thank you for your prompt response! I appreciate your assistance. Regarding the section in question, I'm specifically referring to the fields and icons highlighted in the attached screenshot. Could you kindly guide me on how to edit these elements? Your help is much appreciated! - 🇩🇪Germany D34dMan Hamburg
@drupaler99,
The order of the fields displayed could be controlled from here '/admin/structure/types/manage/pmproject/display'Regarding how you could theme the icons, do you know how to create a custom theme and override templates?
- 🇲🇦Morocco achrafon
@D34dMan
I'm new to Drupal and looking for a straightforward way to rearrange fields and their associated icons. Can you provide guidance on the simplest method to achieve this? Any assistance would be appreciated. - 🇲🇦Morocco achrafon
Hey @D34dMan
I think I found a simple solution by deleting the code in this part of the directory:
pm_kickstart_theme/templates/node/node--pmproject.tpl.print $node->nid; " class="
print $classes;
clearfix"print $attributes;
>echo render($content['pm_contextual_link']);
echo render($content['pm_projectpriority']);
echo render($content['pm_price']);
echo render($content['pm_currency']);
echo render($content['pm_pricemode']);
echo render($content['pm_billing_status']);
echo render($content['pm_duration']);
echo render($content['pm_durationunit']);
echo render($content['pmproject_parent']);
echo render($content['pm_projectstatus']);
echo render($content['pm_projectcategory']);
It solves the problem for me by hiding the row with icons; it renders as the default view of project page.
- Will this step cause problems in my project?
- Status changed to Fixed
10 months ago 4:05pm 24 January 2024 - 🇩🇪Germany D34dMan Hamburg
If that works for you, then its a good start.
Now to do it in a maintainable way, you can follow the recommendation in this tutorial on how to override a template file https://www.drupal.org/docs/7/theming/overriding-themable-output/beginne... →
Automatically closed - issue fixed for 2 weeks with no activity.