简体   繁体   English

在joomla 2.5注册xml标签旁边添加链接

[英]add link next to label of joomla 2.5 registration xml

i need to add a link next to the label (or in the label) of all the fields. 我需要在所有字段的标签(或标签)旁边添加一个链接。 i have placed my xml for the name field below (it should be simple to extend it to the others). 我将我的xml放在下面的名称字段中(将其扩展到其他位置应该很简单)。 eg next to name it should have an html link. 例如,在名称旁边应有一个html链接。 can't get it to work though. 虽然无法正常工作。 please help 请帮忙

here's my xml: 这是我的xml:

<field name="name" type="text"
            description=""
            filter="string"
            label="Full Name"
            message="COM_USERS_REGISTER_NAME_MESSAGE"
            required="true"
            size="30"
                        class="signupbox"

        />

and here's my registration.php 这是我的registration.php

<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_users
 * @copyright   Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 * @since       1.6
 */

defined('_JEXEC') or die;

JHtml::_('behavior.keepalive');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('behavior.noframes');
?>
<style>.star{display:none;}#recaptcha_table{width: 505px;}input#recaptcha_response_field{;}</style>
<div style="font-size: 22px;margin-bottom:20px;border-bottom: solid 1px #ddd;padding-bottom: 3px;">Create an account at the Homeovitality Store.</div>
<div class="registration<?php echo $this->pageclass_sfx?>">
<?php if ($this->params->get('show_page_heading')) : ?>
    <h1><?php echo $this->escape($this->params->get('page_heading')); ?></h1>
<?php endif; ?>
<div id="signup-form">
    <form id="member-registration" action="<?php echo JRoute::_('index.php?option=com_users&task=registration.register'); ?>" method="post" class="form-validate">
<?php foreach ($this->form->getFieldsets() as $fieldset): // Iterate through the form fieldsets and display each one.?>
    <?php $fields = $this->form->getFieldset($fieldset->name);?>
    <?php if (count($fields)):?>

        <?php if (isset($fieldset->label)):// If the fieldset has a label set, display it as the legend.
        ?>

        <?php endif;?>
            <div>
        <?php foreach($fields as $field):// Iterate through the fields in the set and display them.?>
            <?php if ($field->hidden):// If the field is hidden, just display the input.?>
                <?php echo $field->input;?>
            <?php else:?>
                <div style="margin-bottom:8px;">
                    <?php echo $field->label; ?>    
                </div>
                <div style="margin-bottom:20px;"><?php echo ($field->type!='Spacer') ? $field->input : "&#160;"; ?></div>
            <?php endif;?>
        <?php endforeach;?>
            </div>

    <?php endif;?>
<?php endforeach;?>
        <div id="agree-text">By clicking "Create my account" (below), you signify your agreement to the <a href="/legal/terms-and-conditions" target="_blank">terms & conditions</a>, <a href="/legal/disclaimer" target="_blank">disclaimer</a> and <a href="/legal/privacy-policy" target="_blank">privacy policy</a> (including the use of cookies).</div>

        <div>


<div style="float:left;"><button type="submit" class="validate" id="createmyaccountbuttonbluelarge"></button></div>
            <div style="font-size:12px;display:inline-block;margin-left:20px;padding-top: 9px;float: left;"><a href="/store/index.php?option=com_virtuemart&view=category&virtuemart_category_id=1&Itemid=104">Cancel account creation</a></div>
            <input type="hidden" name="option" value="com_users" />
            <input type="hidden" name="task" value="registration.register" />
            <?php echo JHtml::_('form.token');?>
        </div>
    </form> 
</div>
</div>
            <div style="margin-bottom:8px;">
                <?php echo $field->label; ?><a href="index.php">Link</a>   
            </div>

You should be able to just add it as part of this section of code like the above. 您应该能够像上面一样将其添加为本节代码的一部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM