test
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • splifen Friend
    #167523

    Hi, how can i create a modul position in the rightside of the top. header(the right side of the logo position)
    I would the to put a image or a banner or something like that.

    http://www.byggeoplevelser.dk
    Best regards Kenneth

    TomC Moderator
    #406752

    In your particular case, this could actually be very simple – as it appears that you are not utilizing the “search” position (which, in the base template, is positioned on the right side of the header section).

    So, what you could do is create a Custom Mod (in your Module Manager) and assign it to the “search” position.

    Likely, depending on the size of your banner add, you will need to perform some CSS modification. So, what you could do (if you do not intend to use the “search” box) is simply find the CSS for the search box within your template.css file and modify as needed (i.e. width, height , margin/padding, etc.)

    Does this help?

    splifen Friend
    #406758

    that could be an god idea. But what can be done if not using the search pos..

    Best regards Kenneth

    TomC Moderator
    #406760

    <em>@splifen 260406 wrote:</em><blockquote>that could be an god idea. But what can be done if not using the search pos..

    Best regards Kenneth</blockquote>
    The “search” position is already there . . . . so, the beauty of the suggestion I provided above (provided you are not planning on using the “search” module in that position) is that the position is already established for you. You simply assign your custom_mod to that “search” position and modify the relative CSS to fit the specifications you need.

    splifen Friend
    #406768

    yes thats good thinking, but in the future the search module will be active, but not on the front but on other pages, so i have to find a different solution.

    Best Regards Kenneth

    TomC Moderator
    #406771

    <em>@splifen 260417 wrote:</em><blockquote>yes thats good thinking, but in the future the search module will be active, but not on the front but on other pages, so i have to find a different solution.

    Best Regards Kenneth</blockquote>
    In that case . . . the next simplest thing to do would be to add an additional position in the same spot and simply designate on the selected pages. Tell you what, I will look through the JA Portfolio files and give you a step-by-step for this . . . hold tight.

    khoand Friend
    #406780

    You add this code into /plugins/system/jat3/jat3/base-themes/default/blocks/header.php


    <?php if($this->countModules('banner')) : ?>
    <div id="ja-banner" style="float:left">
    <jdoc:include type="modules" name="banner" />
    </div>
    <?php endif; ?>

    before


    <?php if($this->countModules('search')) : ?>
    <div id="ja-search">
    <jdoc:include type="modules" name="search" />
    </div>
    <?php endif; ?>

    You set position of module that you want to use is banner

    TomC Moderator
    #406782

    Okay, here is what you can do . . . .

    STEP ONE:
    Within the following path –> templates/ja_portfolio/blocks/header.php

    open header.php with your text editor. at/around line 34/35, add/modify as follows . . .


    <?php if($this->countModules('top-banner')) : ?>
    <div id="top-banner">
    <jdoc:include type="modules" name="top-banner" />
    </div>
    <?php endif; ?>

    <?php if($this->countModules('search')) : ?>
    <div id="ja-search">
    <jdoc:include type="modules" name="search" />
    </div>
    <?php endif; ?>

    <?php $this->genBlockEnd ($block) ?>

    NOTE: I called the new position “top-banner,” but you can name it anything you like.

    STEP TWO:
    Open up your TemplateDetails.xml file and – at/around line 43 – add/modify as follows . . .


    <positions>
    <position>hornav</position>
    <position>breadcrumbs</position>
    <position>top-banner</position>
    <position>search</position>
    <position>banner</position>
    <position>left</position>
    <position>right</position>
    <position>top</position>
    <position>user1</position>
    <position>user2</position>
    <position>user3</position>
    <position>user4</position>
    <position>user5</position>
    <position>user6</position>
    <position>user7</position>
    <position>user8</position>
    <position>user9</position>
    <position>user10</position>
    <position>user11</position>
    <position>footer</position>
    <position>syndicate</position>
    <position>debug</position>
    <position>slideshow</position>
    <position>content-mass-top</position>
    </positions>

    STEP THREE:
    Go to templates/ja_portfolio/css and open up your template.css file

    at/around line 450, add the following css rule and set the parameters as needed . . .
    (the following parameters are only for example)


    #top-banner {
    border: 1px solid #cacccd;
    bottom: 20px;
    right: 5px;
    height: 50px;
    width: 300px;
    }

    STEP FOUR:
    Within your Module Manager, create a new Custom Mod … assign it to the newly created “top-banner” position (or whatever you called it) and enter your custom HTML within the custom field.

    TIP: What I usually do is just copy one of the existing custom_mods and then rename/customize as needed. 😎

    That is basically it. As I said, you will need to fiddle around with the CSS styling/positioning to get it exactly as YOU want – but it shouldn’t be too difficult or take too long. ALSO, you will need to designate this module for the specific menu items/pages on which you want it to display – as opposed to those menu items/pages where you want the search module to display. If you want them BOTH enabled for a same menu item/page, then you will need to adjust the positioning of one or the other within their relative CSS rules accordingly.

    It can take a bit of time/effort to get things as you want them …. but the learning experience from the trial-and-error experimentation will add to your knowledge for future similar customizations.

    Hope this helps. Let me know if you run into any problems.

    TOM

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

This topic contains 8 replies, has 3 voices, and was last updated by  TomC 13 years, 4 months ago.

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