CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Ordering
Pages: [1]

Author Topic: Ordering  (Read 2157 times)

denverdataman

  • I post occasionally
  • **
  • Posts: 93
  • Karma: 2
    • Denver DataMan Website
  • CiviCRM version: Several
  • CMS version: Drupal 6/7
Ordering
March 11, 2008, 06:56:32 am
I am working on tweaking Civi for an installation for a client that has a good amount of custom data. Is there any way to change the order of tabs and inline field areas in the primary forms used by Civi?

Thanks,
Steve
Steve Kessler
Owner and Lead Consultant of Denver DataMan

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Ordering
March 11, 2008, 09:29:32 am

hopefully this is with v2.0 where custom data is stored in a much more efficient manner :)

You can change the order of tabs using the weight field in each tab

You can change the inline field areas by using the weight field and/or customizing the templates

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

denverdataman

  • I post occasionally
  • **
  • Posts: 93
  • Karma: 2
    • Denver DataMan Website
  • CiviCRM version: Several
  • CMS version: Drupal 6/7
Re: Ordering
March 11, 2008, 09:34:01 am
I guess I am missing something, can you tell me where to go to change weights...I am using Civi 2.0 beta for this installation and I must just be reading over it.

Thanks,
Steve
Steve Kessler
Owner and Lead Consultant of Denver DataMan

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Ordering
March 11, 2008, 09:42:20 am

oops, we call it "Order" now (used to be called weights). Check:

http://drupal.demo.civicrm.org/civicrm/admin/custom/group?reset=1
http://drupal.demo.civicrm.org/civicrm/admin/custom/group?action=update&reset=1&id=1


lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

denverdataman

  • I post occasionally
  • **
  • Posts: 93
  • Karma: 2
    • Denver DataMan Website
  • CiviCRM version: Several
  • CMS version: Drupal 6/7
Re: Ordering
March 11, 2008, 12:39:06 pm
Right, I get that. But is there any way to change its order with the existing tabs.

Thanks,
Steve
Steve Kessler
Owner and Lead Consultant of Denver DataMan

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Ordering
March 11, 2008, 12:52:39 pm

No.You will have to customize the existing template (preferred method)

templates/CRM/Contact/Page/View/Tabbed.tpl

or hack the code CRM/Contact/Page/View/Tabbed.php

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

jackaponte

  • I’m new here
  • *
  • Posts: 19
  • Karma: 2
Re: Ordering
February 23, 2009, 12:14:24 pm
Any change that changing the order of existing (ie not custom) tabs can be added as a feature? Would be nice!

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Ordering
February 23, 2009, 12:50:12 pm

if u want to hack it in for now:

CRM/Contact/Page/View/Tabbed.php, line 231 or so (depending on the order u want)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

jackaponte

  • I’m new here
  • *
  • Posts: 19
  • Karma: 2
Re: Ordering
May 15, 2009, 08:37:23 am
OK - finally got around to working on this, but I'm not sure what I'm supposed to change in Tabbed.tpl or what I would hack in Tabbed.php.

I see that this is what is relevant in Tabbed.tpl:

Code: [Select]
{foreach from=$allTabs key=tabName item=tabValue}
  <div id="{$tabValue.id}" dojoType="dojox.layout.ContentPane" href="{$tabValue.url}" title="{$tabValue.title}"
class ="tundra" {if $tabValue.id eq $selectedChild} selected="true"{/if} style="overflow: auto; width: 100%; height:100%;"></div>
{/foreach}

But you can't really change the order there, because the order is passed from Tabbed.php. When I look at Tabbed.php, I can see where weights are set for existing tabs. But I can't see how to change the order of those tabs without hacking Tabbed.php - is there supposed to be a way to do it by editing Tabbed.tpl? Doesn't seem like PHP belongs in .tpl so I can't see how I'd do it.

Ultimately, I'd like to figure out how to
a) change the order of existing, default CiviCRM tabs, and
b) change the order in such a way that I can mix custom tabs with existing CiviCRM tabs, not just have them appended at the end.

If anyone has any specific advice for how to do that, please share. Ultimately, I do think that tab order should be implemented as a setting in the CiviCRM web interface - mad haxxor skillz shouldn't be necessary for something so basic and probably so commonly desired!

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Ordering
May 15, 2009, 09:56:44 am

hey jack:

u can implement the tab hook and reorder them there

http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+hook+specification#CiviCRMhookspecification-hookcivicrmtabs

yes, this is not as convenient as having a UI to do so. If important to you consider submitting a patch to do the needful (should probably go under site preferences)

lobo


A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Ordering

This forum was archived on 2017-11-26.