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 CiviEvent (Moderator: Yashodha Chaku) »
  • Template for Civievents
Pages: [1]

Author Topic: Template for Civievents  (Read 1513 times)

tabidi

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 5
Template for Civievents
March 28, 2009, 06:41:15 pm
I was trying to develop different look for 2 events. I created 2 folders under civicrm_custom/CRM/Event/Form/Registration/ (my custom template directory) named them 1 & 2. I copied Register.tpl into the folders and modied the files according to my needs everything worked.

Now I want to modify Confirm.tpl and Thankyou.tpl, it seems I cannot do that it always seems to pickup the files from 1.

Is it possible to have customize Confirm and Thankyou.tpl's per event?

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Template for Civievents
March 29, 2009, 11:20:02 pm
tabidi :

Quote
Is it possible to have customize Confirm and Thankyou.tpl's per event?

Yes, so for any event you could have  CRM/Event/Form/Registration/X/Confirm.tpl and CRM/Event/Form/Registration/X/ThankYou.tpl
where X is event id.

There is a wiki page about this here: http://wiki.civicrm.org/confluence/display/CRMDOC/Customize+Built-in%2C+Profile%2C+Contribution+and+Event+Registration+Screens

hth
-Yashodha
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

tabidi

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 5
Re: Template for Civievents
March 30, 2009, 02:15:25 pm
<custom_template_folder>/CRM/Event/Form/Registration/X/Confirm.tpl and CRM/Event/Form/Registration/X/ThankYou.tpl

Does not work. I tried that based on the documentation on the wiki page. It was what I was trying to say in my previous post sorry I wasnt clear, the only difference was that I have a custom tempaltes folder at the begining.

I will try to put the files directly under civicrm install directory and see if that works and report back

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: Template for Civievents
March 30, 2009, 02:42:43 pm

any chance we can get ssh access to your server. might enable us to debug faster than trying to recreate on our local sandbox :)

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

tabidi

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 5
Re: Template for Civievents
March 30, 2009, 05:03:58 pm
Lobo thanks for the offer - I got it working

I guess my problem was that I expected the "2" event to use the default template and I didnt copy the default template files into the "2" folder. Once I copied the files everything works.

So if you have customized a template for one of the events it seems every event will have the customized template. To override the customized template back to default behaviour you need to create the folder structure and copy the default template.

Hope this helps someone else.

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: Template for Civievents
March 30, 2009, 05:58:45 pm

we did check the code and based on the code, i dont think the below is true. We use the smarty fucntion template_exists (http://www.smarty.net/manual/en/api.template.exists.php) to see if a template exists for a specific event id, else we use the default.

If you can trace and figure out what is happening at: CRM/Event/Form/Registration.php, function getTemplateFileName that would be great

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

tabidi

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 5
Re: Template for Civievents
April 02, 2009, 06:39:08 pm
I cannot reproduce on my test system. I must have done something wrong.


Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Template for Civievents

This forum was archived on 2017-11-26.