test
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • legalgrind Friend
    #170463

    We are using the Links element in the Contacts component (we call this Articles for non-user authors) and need more links than what is there. Is this possible, and if so, how can we do it?

    See:
    http://legalgrind.powweb.com/joomla/index.php/attorneys/13-warren-s

    for how it is used.

    Your help will be appreciated.

    Thank you!

    khoand Friend
    #423574

    I don’t understand what you mean clearly. Could you explain more? A snapshot with your annotation is very helpful to help me understand your idea clearly. Do you want to add more article link in Article tab?

    legalgrind Friend
    #423588

    This is shot from Admin of Contact form: Display: Show Links. It ends with Link E Label, Link E Url. I want to add Link F, G, H, et al.

    This shows a Contact form from the Web. There are only 5 links listed. (Please not, I have changed the word Links to Articles through ftp.) I want more links listed.

    I hope this is clear but if not, please let me know.

    Thank you!


    1. contact-links
    2. contact-links-pg
    khoand Friend
    #423652

    I want to add Link F, G, H, et al.

    You add this code into /administrator/components/com_contact/models/forms/contact.xml

    <field name="linkf_name"
    type="text"
    label="COM_CONTACT_FIELD_LINKF_NAME_LABEL"
    description="COM_CONTACT_FIELD_LINK_NAME_DESC"
    class="inputbox"
    size="30"
    />

    <field name="linkf"
    type="text"
    label="COM_CONTACT_FIELD_LINKF_LABEL"
    description="COM_CONTACT_FIELD_LINKF_DESC"
    class="inputbox"
    size="30"
    />
    <field name="linkg_name"
    type="text"
    label="COM_CONTACT_FIELD_LINKG_NAME_LABEL"
    description="COM_CONTACT_FIELD_LINK_NAME_DESC"
    class="inputbox"
    size="30"
    />

    <field name="linkg"
    type="text"
    label="COM_CONTACT_FIELD_LINKG_LABEL"
    description="COM_CONTACT_FIELD_LINKG_DESC"
    class="inputbox"
    size="30"
    />
    <field name="linkh_name"
    type="text"
    label="COM_CONTACT_FIELD_LINKH_NAME_LABEL"
    description="COM_CONTACT_FIELD_LINK_NAME_DESC"
    class="inputbox"
    size="30"
    />

    <field name="linkh"
    type="text"
    label="COM_CONTACT_FIELD_LINKH_LABEL"
    description="COM_CONTACT_FIELD_LINKH_DESC"
    class="inputbox"
    size="30"
    />

    before

    <field
    name="contact_layout"
    type="componentlayout"
    label="JFIELD_ALT_LAYOUT_LABEL"
    description="JFIELD_ALT_COMPONENT_LAYOUT_DESC"
    extension="com_contact"
    view="contact"
    useglobal="true"
    />

    legalgrind Friend
    #423663

    It didn’t work for me … perhaps I did something wrong?

    Snapshot of xml file:

    Snapshot of Admin page:

    Snapshot from Web – no link added

    I appreciate your help!!


    1. contact-xmlFile
    2. contact-fromAdmin
    3. contact-fromWeb
    khoand Friend
    #423805

    You try replace this code from /components/com_contact/views/contact/tmpl/default_links.php


    foreach(range('a', 'e') as $char) :// letters 'a' to 'e'

    with


    foreach(range('a', 'h') as $char) :// letters 'a' to 'e'

    legalgrind Friend
    #423824

    It still didn’t work; and now the list on the web shows only 1 link.

    php file

    from web

    from admin (it is the same as last time)


    1. contactPhp
    2. contactPgWeb
    3. contact-fromAdmin
    khoand Friend
    #424034

    Your code is incorrect. (‘h’ without * characters), like this

    foreach(range('a', 'h') as $char) :// letters 'a' to 'e'

    legalgrind Friend
    #424059

    Thank you so very much – it works perfectly now. The asterisks were added when I did a copy & paste … whoops!

Viewing 9 posts - 1 through 9 (of 9 total)

This topic contains 9 replies, has 2 voices, and was last updated by  legalgrind 13 years, 1 month ago.

We moved to new unified forum. Please post all new support queries in our New Forum