test
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • qbik Friend
    #197072

    When i add module.php to <mytemplate>/html/ it crash whole site
    im using t3-blank

    I want to modify module.php to add link to module title

    I dont know any other option to do that

    maybe there is some default module.php file that works correctly with T3

    chavan Friend
    #532427

    There are quite a few place where you can edit

    pluginssystemt3base-bs3htmlmodules.php

    pluginssystemt3basehtmlmodules.php

    Hope this helps

    qbik Friend
    #532455

    yes it help
    but there is one more problem i have some php code for it but i dont know how to add this to T3 module.php 🙁

    My code look like this

    [PHP]<?php if ($module->showtitle != 0) : ?>
    <?php $title_link = $params->get(‘title_link’); ?>
    <h3><?php if($title_link) { ?> <a href=”<?php echo $params->get(‘title_link’); ?>”> <?php } ?><?php echo $module->title; ?><?php if($title_link) { ?></a><?php } ?></h3>
    <?php endif; ?>[/PHP]

    can You help me with that??

    chavan Friend
    #532482

    can you please post your site Url , admin details and ftp details in PM. so I can look into it directly.

    chavan Friend
    #532634

    you can custom field for link only for SP Accordion module and how do you want it to reflect on all pages ? please advice I don’t understand.

    qbik Friend
    #532646

    Ok i add field like custom field in accordion module for link address and I need to change module.php on my template

    I have to modify this part of code [PHP]function modChrome_T3Xhtml($module, &$params, &$attribs)
    {
    $badge = preg_match (‘/badge/’, $params->get(‘moduleclass_sfx’))? ‘<span class=”badge”> </span>’ : ”;
    $moduleTag = htmlspecialchars($params->get(‘module_tag’, ‘div’));
    $headerTag = htmlspecialchars($params->get(‘header_tag’, ‘h3’));
    $headerClass = $params->get(‘header_class’);
    $bootstrapSize = $params->get(‘bootstrap_size’);
    $moduleClass = !empty($bootstrapSize) ? ‘ col-sm-‘ . (int) $bootstrapSize . ” : ”;
    $moduleClassSfx = htmlspecialchars($params->get(‘moduleclass_sfx’));

    if (!empty ($module->content)) {
    $html = “<{$moduleTag} class=”t3-module module{$moduleClassSfx} {$moduleClass}” id=”Mod{$module->id}”>” .
    “<div class=”module-inner”>” . $badge;
    if ($module->showtitle != 0) {
    $html .= “<{$headerTag} class=”module-title {$headerClass}”><span>{$module->title}</span></{$headerTag}>”;
    }

    $html .= “<div class=”module-ct”>{$module->content}</div></div></{$moduleTag}>”;
    echo $html;
    }
    }[/PHP] to add in title line new field taken from module settings called title link

    so in normal module.php it should look like this

    [PHP]<?php if ($module->showtitle != 0) : ?>
    <?php $title_link = $params->get(‘title_link’); ?>
    <h3><?php if($title_link) { ?> <a href=”<?php echo $params->get(‘title_link’); ?>”> <?php } ?><?php echo $module->title; ?><?php if($title_link) { ?></a><?php } ?></h3>
    <?php endif; ?>[/PHP]

    and the question is how to change yours module.php to have the same functionality

    edit

    for now I do something like this

    if ($module->showtitle != 0) {
    $html .= “<{$headerTag} class=”module-title {$headerClass}”><a href=”{$title_link}”/><span>{$module->title}</span></a></{$headerTag}>”;
    }

    and it works but it add link to each module title is it possible to add some if function to check is there a title link entered or not with some else option?

    chavan Friend
    #532944

    Since it is a kind of a override please give us some more time to fix it.

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

This topic contains 7 replies, has 2 voices, and was last updated by  chavan 10 years, 7 months ago.

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