0
Welcome Guest! Login
0 items Join Now

Contact details page for authors

  • Contact details page for authors

    Posted 12 years 1 month ago
    • See sample here: http://liftermag.com/component/contact/contact/14-meet-the-writers-of-lifter-magazine/2-jonas-lengauer

      I am trying to create a little profile for each of our authors using the contacts component of Joomla 2.5. I already changed the language file to display "About Me" instead of the miscellaneous info or whatever else it says by default.

      How can I add the author's name in so instead it reads "About [author's name]" ("About Jonas Lengauer" as seen in the sample above)?

      I'd really appreciate any help with this!
    • David Goode's Avatar
    • David Goode
    • Preeminent Rocketeer
    • Posts: 17058
    • Thanks: 890
    • Web Designer and Host

    Re: Contact details page for authors

    Posted 12 years 1 month ago
    • Hi there,

      You would have to edit the Joomla com_contact default.php for the contact view.

      Trouble is it would get lost on every update so you would need to create an override and include it in the template html folder.

      You can find out more here - docs.joomla.org/Understanding_Output_Overrides

      Hope this helps 8)

    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information
  • Re: Contact details page for authors

    Posted 12 years 1 month ago
    • Thanks for the reply!

      I did create the override, what I have trouble with though is finding the right variable to fill in the author's name. Do you know how to replace the static word "Me" (as in About Me) with the contact's name (f.e. "About John Doe")?
    • David Goode's Avatar
    • David Goode
    • Preeminent Rocketeer
    • Posts: 17058
    • Thanks: 890
    • Web Designer and Host

    Re: Contact details page for authors

    Posted 12 years 4 weeks ago
    • Hi there,

      I haven't tried this but I guess if you look at the default.php file in Joomla contact and amend line 94 and add beneath it as shown...
      <?php if ($this->params->get('presentation_style')=='plain'):?>
           <?php echo '<h3>'. JText::_('COM_CONTACT_PROFILE').'</h3>'; ?>
      <?php endif; ?>
      becomes...
      <?php if ($this->params->get('presentation_style')=='plain'):?>
           <?php echo '<h3>'. JText::_('COM_CONTACT_PROFILE'); ?>
           <?php echo $this->contact->name; ?>.'</h3>'; ?>
      <?php endif; ?>
      You will then have to consider editing the Language Override for COM_CONTACT_PROFILE to remove the word 'me'.

      Hope this helps 8)

    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information

Time to create page: 0.060 seconds