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

    Whilst setting up to replicate the frontpage of One page, I was finding that <blockquote>TPL_SUBTITLE_SERVICES</blockquote> was displayed underneath the modules title.

    What I have found is that if you change the Title of any of the modules used on the front page this code is displayed.

    I renamed the Introducing module and called it Services, and this code is displayed, change it back to Introducing, then the code is replaced with Hello, We are Page.Team. What We Can Do?

    Checked the HTML code in the custom text but no reference to this.
    Looks like you have built this into and detected to be displayed.
    Do we have to create language over rides to replace this text?
    There is no option to prevent this in the module and I have not seen a parameter in the template.

    Can someone take a look into this please.

    Simon
    K2Joom

    k2joom Friend
    #479546

    To add to the above,

    When my modules is called Services, inspecting the page shows:

    <div class="section-title" id="services">
    <h2><span>Services</span></h2>
    <span class="section-subtitle">TPL_SUBTITLE_SERVICES</span>
    </div>

    Change this back to Introducing, then reinspect and the code is:

    <div class="section-title" id="introducing">
    <h2><span>Introducing</span></h2>
    <span class="section-subtitle">Hello, We are Page.Team. What We Can Do?</span>
    </div>

    So what is setting the Subtitle?

    Checking through the files, I found html/modules.php and in this the code is:

    <?php if ($module->showtitle != 0) : ?>
    <div class="section-title" id="<?php echo $menuid ?>">
    <h2><span><?php echo $module->title; ?></span></h2>
    <span class="section-subtitle"><?php echo $subtitle ?></span>
    </div>
    <?php endif; ?>

    Again, where is $subtitle created?

    So I go and check language codes: languageen-GB
    Low and behold I find this:

    TPL_SUBTITLE_INTRODUCING = "Hello, We are Page.Team. What We Can Do?"
    TPL_SUBTITLE_AWESOME_TEAM = "Who We Are? Information About Us."
    TPL_SUBTITLE_OUR_PORTFOLIO = "Below are some of our best design works we have done for clients."
    TPL_SUBTITLE_HAPPY_CLIENTS = "We're Trusted by Over 20,000 Handsome Customers."
    TPL_SUBTITLE_GET_IN_TOUCH = "Thanks for looking. We'd love to hear from you."

    This looks like checking the module title and then displaying text from the language file, but with no fallback to allow anything other than those 5 possibilities. Should there be some parameter in the template to set those titles?

    k2joom Friend
    #479548

    OK, So to prove this concept, I just created a custom language over ride through Language Manager.
    I used TPL_SUBTITLE_SERVICES as the constant and then added some text, then saved.

    Then gave my frontpage module the title of Services and saved.

    Refresh the page and hey presto, Services = Module title, and the text is now correctly displayed as a subtitle.

    Now tell me something, what if by some crazy chance any of the users of OnePage actually do not want to have a subtitles displayedthere appears to be no option to disable it. Additionally, if someone wanted to have more than 5 sections on the frontpage, they would have to create additional language strings.
    This could have been configured by the module but as there is no module over ride provided in the template html folder and the fact that there as so many modules that could be used it makes this route impractical, but it is all being controlled by the modules.php, again, no option to control this.

    If there is a parameter to control the section subtitles, I would love to know where, it is not in the template as there is very little to control these days.
    For those that do not want subtitles at all, then you will have to modify the modules.php found in ja_onepage/html.
    Look for
    <h2><span><?php echo $module->title; ?></span></h2>
    <span class="section-subtitle"><?php echo $subtitle ?></span>

    Change it to
    <h2><span><?php echo $module->title; ?></span></h2>

    Look forward to other suggestions.

    tiwi Friend
    #479655

    It is explained here http://www.joomlart.com/forums/topic/ja-one-page-template-userguide/ , you have to change it in the en-GB.tpl_ja_onepage.ini file in the language folder. I used the ftp to get to it, opened it with notepad, saved again and uploaded, don’t forget the .ini part in the file at the end. worked for me 🙂

    k2joom Friend
    #479700

    Thanks for the link Tiwi,

    IMHO, that is just a stupid idea from JA as there is no option to disable that subtitle.
    To place that text in the language file is crazy.

    PS, no need to use FTP to add or edit language files, just go to Language Manager, then the over rides tab.
    There you can search by constant or text. This will then add it the language over ride so it is not affected by extension updates.
    Additionally you can create new constants, which is perfect for this situation.

    Thanks again friend.

    Simon

    Saguaros Moderator
    #479808

    Hi,

    That language parameter of module (for subtitle) is only auto rendered when module title is enabled and editing language text is the only way now.

    k2joom Friend
    #479946

    Yes I understand.
    But what if, you want to display module title but NOT the subtitle?

    Saguaros Moderator
    #480149

    You can simply remove that translated text:
    <blockquote>TPL_SUBTITLE_INTRODUCING = “Hello, We are Page.Team. What We Can Do?”</blockquote>
    change to:
    <blockquote>TPL_SUBTITLE_INTRODUCING = “”</blockquote>

    ecohaven Friend
    #480667

    Or create a new override in language manager. Copy the code from the front end, go to language manager, select Overrides tab, click new override. Paste in the string, and type in your translation.

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

This topic contains 9 replies, has 4 voices, and was last updated by  ecohaven 11 years, 11 months ago.

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