0
Welcome Guest! Login
0 items Join Now

SOLVED Creating new template Position

    • jayjayr's Avatar
    • jayjayr
    • Hero Rocketeer
    • Posts: 330
    • Thanks: 1

    SOLVED Creating new template Position

    Posted 3 years 8 months ago
    • Hello, hope someone can help with this.
      Creating a new template position in gantry5 is less flexible than in gantry4, as it seems to me.
      In gantry4 to create a new position we just insert a div in the template index and that position can be used as itself. In gantry5 although the new position can have ist own name it must be crated as a module position particle and when we call a module on the new position it is always loaded in the module position where the particle was inserted.
      I give an example.
      I have a module to show a popup window on any web page of the site. In gantry4 I use this code below to define the new position in the index template:
      <div class="jcrpopimgplc">

      <jdoc:include type="modules" name="position-99" style="xhtml" />

      </div>
      Where "position-99" is the new position. It is not related with any other position in the template. When I configure the popup I set its position to position-99 and set the rest of the parameters to show the window more to right or more down, etc and it can be shown anywhere on the page over no matter what the position or the content.
      In gantry5 I have to make a particle module position in a pre existing position in the layout. Even it I name this new position as position-99 it belongs to the position where it was created, say slideshow.
      When I execute the module it is always shown in the slideshow position and don't allow to position it in any other place in the page.

      I don't know if I could well express the problem.

      Thank you,
      Jay
    • Last Edit: 3 years 8 months ago by jayjayr.
    • Trying to learn something every day
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: SOLVED Creating new template Position

    Posted 3 years 8 months ago
    • It will be something else positions that popup wherever you want on the page (usually via CSS but coule be javascript). A module position place on the Gantry 5 layout behaves exactly as it would in Gantry 4. The difference is that in Gantry4 it's in a fixed location whereas in Gantry 5 you can place that position wherever you want to.

      Furthermore, it seems to me that what you actually want to do is load your content anywhere you like on the layout using a fictitious positionname (where you've assigned a module to that fictitious position but it really doesn't exist on the layout). To do that in Gantry 5 you should use a customhtml particle and use Joomla's {loadposition xxxx}.

      But really it's best to use module positions as they're intended by Gantry and Joomla i.e. the position is the "hole" into which you place content (a module).

      I may have misunderstood you but basically Gantry 5 is way more sophisicated that Gantry 4 was in this are and everything you could do in Gantry 4 you can still do in Gantry 5.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • jayjayr's Avatar
    • jayjayr
    • Hero Rocketeer
    • Posts: 330
    • Thanks: 1

    Re: SOLVED Creating new template Position

    Posted 3 years 8 months ago
    • Hi Mark,
      Thank you for your answer.
      You undertood very well what I meant. I believe (am sure by experience) that gantry5 is much more flexible than gantry4 but at first some things are not very obvious.
      I managed to define the position in gantry5 by including the div code in After Body Attribute in Page Settings. It works in this site (youdrive.cc) although it makes the image smaller.
      I'm trying to do the same in the site novaimagem.co.pt but to strange things happen.
      1 - it shows in the page a blank position in the very bottom
      2 - it shows the popup window UNDER the other template positions
      Please take a look and if needed I sand you credentials

      Another thing eventually better than what I'm doing is the suggestion you give, and I'm sorry but I didn't fully understand.
      "But really it's best to use module positions as they're intended by Gantry and Joomla i.e. the position is the "hole" into which you place content (a module)."
      You mean make a new module position in slideshow (example) and name it popwindow (example) and then refer the module position to popwindow?
      I tried it but it shows the whole extension of the new position of slideshow and only the windows in it. It is not seen as if the window is above the whole content.

      Kind regards,
      Jay
    • Trying to learn something every day
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: SOLVED Creating new template Position

    Posted 3 years 8 months ago
    • Please would you post your URL, superuser id and pswd in the secure tab of your post and I'll have a look for you.

      It would also be useful to have the login details to the Gantry 4 site that is working as you want.

      Give me exact steps to test the issue.

      Also, Please post your FTP logon, password and FTP URL in the secure area of your post.


      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • jayjayr's Avatar
    • jayjayr
    • Hero Rocketeer
    • Posts: 330
    • Thanks: 1

    Re: SOLVED Creating new template Position

    Posted 3 years 8 months ago
    • Hi Mark,
      Credentials sent in sec tab
      Thank you
      Jay
    • Last Edit: 3 years 8 months ago by jayjayr.
    • Trying to learn something every day
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: SOLVED Creating new template Position

    Posted 3 years 8 months ago
    • 1. Use this code...
      .popover img {
          max-width: none;
      }
      * Gantry does have some CSS that stops an img exceeding the width of it's container - but this popover code that you're using want to exceed that so I just negated it with CSS.

      To create a custom CSS compatible with Gantry 5 please read this http://docs.gantry.org/gantry5/tutorials/adding-a-custom-style-sheet .

      Remember to recompile CSS from base outline too.

      That will allow the image to size to the maximum it has been uploaded at.

      2. In the novagem site you had not loaded bootstrap CSS so I manually added that on the page settings to make it work. Bootstrap is loaded by Joomla when told to. But if you don't tell it then it won't loaded - so as one of the site was working I can only assume that something else on the page is asking Joomla to load it.

      3. You may find this article that I wrote interesting since it represents a more modern and easier way that you're using for Gantry 5. https://rockettheme.com/forum/gantry5-for-joomla/284337-how-to-make-a-timed-or-instant-popup-using-the-popupmodule-particle

      Regards, Mark.
    • Last Edit: 3 years 8 months ago by MrT.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • jayjayr's Avatar
    • jayjayr
    • Hero Rocketeer
    • Posts: 330
    • Thanks: 1

    Re: SOLVED Creating new template Position

    Posted 3 years 8 months ago
    • Thank you Mark.
      With the code for popover and the boostrat loaded it is working. Only one thing I need to check is that the container padding is not following the size of the image. But the important is it is working on top of the content as a really popup.

      I'll check the doc you reccommed to make the popup. I checked before the module but as I were in a rush... you know...
      Now I will check it without stress.

      Thank you very much.
      Jay
    • Trying to learn something every day

Time to create page: 0.065 seconds