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 »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Customizing Advanced Search Template Involving Dojo Panes
Pages: [1]

Author Topic: Customizing Advanced Search Template Involving Dojo Panes  (Read 1068 times)

farmrchrys

  • I post occasionally
  • **
  • Posts: 92
  • Karma: 2
    • Spokane Moves to Amend the Constitution (under development)
  • CiviCRM version: CiviCRM 4.4.6
  • CMS version: Drupal 7.31
  • MySQL version: MySQL 5.5.37
  • PHP version: PHP 5.3.28
Customizing Advanced Search Template Involving Dojo Panes
June 13, 2009, 03:44:39 pm
Hi All,

What I'm trying to accomplish is arranging the contact search criteria in both the basic and advanced seaches to display vertically rather than the original horizontal layout. The horizontal layout requires scrolling that I want to eliminate as the form slips under my sidebars that are both to the right.

I've managed to do it for the basic contact search by inserting
Code: [Select]
</tr><tr> in BasicCriteria.tpl after where each label/value input form element is populated and saving it as a custom template.

That was easy enough. But I'm a bit stuck as to how to accomplish the same simple adjustment for the advanced search page. Looks like the advanced search (AdvancedCriteria.tpl) uses Dojo to populate the fieldset, referencing things called "Panes". It looks to me as if the HTML that determines the display of the fieldset is in these panes (using the Web Developer plugin for Firefox I can edit the resultant HTML, inserting the additional table row tags and achieve the desired result). Where are these panes from which the text and markup for the advanced search criteria are included? I just want to insert
Code: [Select]
</tr><tr> after each label/value pair.

Chrys

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: Customizing Advanced Search Template Involving Dojo Panes
June 13, 2009, 05:32:22 pm

check:

CRM/Contact/Form/Search/*.tpl
templates/CRM/Contribute/Form/Search.tpl

the criteria files are stored in individual tpls. the naming should be quite obvious

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

farmrchrys

  • I post occasionally
  • **
  • Posts: 92
  • Karma: 2
    • Spokane Moves to Amend the Constitution (under development)
  • CiviCRM version: CiviCRM 4.4.6
  • CMS version: Drupal 7.31
  • MySQL version: MySQL 5.5.37
  • PHP version: PHP 5.3.28
Re: Customizing Advanced Search Template Involving Dojo Panes
June 14, 2009, 08:01:16 am
Thanks! Although I searched and searched, they were right under my nose! I found many of the template files for the Advanced Search at /civicrm/templates/CRM/Contact/Form/Search/Criteria. I see now that other parts of the advanced search page that are included as expandable panes lower on the page are generated by template files located in the template directories for each respective component. For example, the template for the Contributions pane is at /civicrm/templates/CRM/Contribute/Form/Search/Common.tpl and the template for the Membership pane is at /civicrm/templates/CRM/Member/Form/Search/Common.tpl.

I edited the template files as needed and placed the edited files in my custom template directory, reconstructing the directory tree there. For example: /MyCustomTpl/CRM/Contact/Form/Search/Criteria. CiviCRM looks here first for custom template files before using an original template file if no custom template exists.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Customizing Advanced Search Template Involving Dojo Panes

This forum was archived on 2017-11-26.