php - How do I customize Joomla 2.5 contact component?

594

I'm trying to setup an alternative layout for the contact component in Joomla 2.5 but my template doesn't seem to be used when the page loads. Here's how I set it up using the documentation found here

/templates/MyTemplate/html/com_contact/contact/alternativelayout.php

Then on the administrator view in my contact component under "Display Options" I have selected alternativeLayout as my "Alternative Layout" and made modifications to the file (even deleted all the code in it) but it seems as if the default layout is always loaded. Please help. Thanks.

666

Answer

Solution:

Be sure to include in your

templates/YourTemplate/

a file

templateDetails.xml

which describe your template and include your folders and files (an exmample from beez5 default template)

<files>
    <folder>css</folder>
    <folder>html</folder>
    <folder>images</folder>
    <folder>javascript</folder>
    <folder>fonts</folder>
    <folder>language</folder>
    <filename>index.html</filename>
    <filename>index.php</filename>
    ...
    ...
</files>

Check for this files in other template root folders.

640

Answer

Solution:

I had the same issue. I managed to solve this as follows:

  1. set alternativelayout.php file name to the original name:

    /templates/MyTemplate/html/com_contact/contact/default.php

  2. set "Contact"->"Display options"->"Alternative Layout" to "Use Global"

it works for me.

People are also looking for solutions to the problem: php - $_SERVER['REMOTE_ADDR'] differs between 2 servers

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.