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 Joomla Extensions (Moderator: lcdweb) »
  • Simple template overrides - where to get at
Pages: [1]

Author Topic: Simple template overrides - where to get at  (Read 1375 times)

alanski

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 5
  • Cup of tea? Yes please
    • Joomkit
  • CiviCRM version: Version in post
  • CMS version: Joomla
  • MySQL version: 5.0
Simple template overrides - where to get at
February 27, 2012, 03:25:30 am
Must say after going to the effort of creating a custom profile form it seems impossible to really template Civi output easily.

Joomla 1.7.x Civi4.1

All i want to do is reformat the label/inputs for check boxes.

It sees the whole lot is contained in a little snippet
Code: [Select]
{$form.$n.html}

Whats the point of template exposure if you cant get to the elements?

How do I get to the label/input generation?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Simple template overrides - where to get at
February 27, 2012, 05:42:34 am
Hi,

Agree, that's not useful and the php part should only give "row" data and let the template does it templating job.

This being said, debug the template and you'll get a window with all the variables assigned and you can usually rebuild the form the way you want (was the case last time I tried).

I'm assuming you know that you can change the label of a field directly via the admin interface of profiles directly?

X+

P.S. One workaround I'm using more and more is to have a .extra.tpl and a few lines of jquery is easier to change stuff on the form. Not technically beautiful, but works well

-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

alanski

  • I post frequently
  • ***
  • Posts: 216
  • Karma: 5
  • Cup of tea? Yes please
    • Joomkit
  • CiviCRM version: Version in post
  • CMS version: Joomla
  • MySQL version: 5.0
Re: Simple template overrides - where to get at
February 27, 2012, 11:21:40 am
Good to know I am not completely mad. Appreciate your reply.
From a standards point of view useing JQuery to manipulate the dom seems like a step backward when all I am trying to do is wrap the form checkboxe elements  in the label.
I fudged it with some heavy CSS in the end but if you think that form completion rates are affected by form layouts then the ability to have a clean template is key. Its a real disappointment trying to tell a client it'll take half a day to brand and usability test their modest forms ...and then some :)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Simple template overrides - where to get at
February 27, 2012, 12:21:14 pm
Agree about jquery manipulation

This being said, fixing the core and exposing the fields is not that complicated. Just it's no one priority enough to fix it ;(

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

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: Simple template overrides - where to get at
February 27, 2012, 03:13:19 pm

hey alan:

there is a code sprint going on in London as we speak. As you are probably aware, Civi depends on code contributions and more from the community to make things better. Might be a good opportunity for you to come up and help improve a few of the things and lies that are bugging you and make the next version better for both you and the community

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 »
  • Using Joomla Extensions (Moderator: lcdweb) »
  • Simple template overrides - where to get at

This forum was archived on 2017-11-26.