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) »
  • Custom Profile Screens by ID not working
Pages: [1]

Author Topic: Custom Profile Screens by ID not working  (Read 1661 times)

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Custom Profile Screens by ID not working
October 20, 2007, 02:02:50 pm
I'm trying to customize templates based on the profile ID, per this page:
http://wiki.civicrm.org/confluence/display/CRMDOC/Customize+Built-in+and+Profile+Screens

I have no problem with overriding default templates when NOT specifying a specific profile ID. But when I follow the guidance on the lower part of that page, creating a subdirectory for the ID number and putting my custom template in there, it doesn't work. It reverts to the default template (even if I have a generic template override in the parent directory). What's strange is that when I view the source for the page, it DOES reference the profile-specific subdirectory. Weird.

Here's the scenario:

In my custom templates folder I have the following:
CRM/Profile/Page/1/View.tpl

When the file is ONLY in:
CRM/Profile/Page/View.tpl

it works -- but affects all calls on that template. I want it to only affect profile 1, which is why I had created and moved it to the /1/ subdirectory.

Has anyone else had issues with this, or have suggestions for troubleshooting?

-Brian
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Deepak Srivastava

  • Ask me questions
  • ****
  • Posts: 677
  • Karma: 65
Re: Custom Profile Screens by ID not working
October 20, 2007, 10:31:53 pm
Have u specified the path in Administer CiviCRM » Global Settings » Directories for "Custom Templates" field ?

If yes, could you tell me the absolute path of your custom template.
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Custom Profile Screens by ID not working
October 21, 2007, 12:08:15 pm
Yes, and my custom templates are working perfectly when I DON'T add the profile-specific directory.

Here's the full path:
/home/XXXXX/media/civicrm/templates/CRM/Profile/Page/1/View.tpl

If I place the file in:
...CRM/Profile/Page/View.tpl

...it works perfectly, but affects all calls to that template (I just want it called for a single profile page).

-Brian
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

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: Custom Profile Screens by ID not working
October 21, 2007, 02:41:39 pm

We just used this feature in the kabissa project (drupal) and it worked quite nicely :)

Not sure why u r having issues and/or if it is a joomla specific bug, but would be great if you could investigate and track it down a bit more.

The relevant file to look at is: CRM/Profile/Page/View.php, getTemplateFileName. this figures out if a specific template does exist etc

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

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Custom Profile Screens by ID not working
October 23, 2007, 08:34:33 pm
I spent some more time on this and it appears to be working correctly. Not sure what I did previously to get the errant results.
-Brian
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Custom Profile Screens by ID not working

This forum was archived on 2017-11-26.