0
Welcome Guest! Login
0 items Join Now

SOLVED Adding template path in one of the Gantry Features.

    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: SOLVED Adding template path in one of the Gantry Features.

    Posted 13 years 10 months ago
    • tho thats not the problem but:
      where are the pictures you want to show
      your script is searching here
      problogger.kodingen.com/gantry/templates...ow/monsters/img6.png

      But there is no picture-file?
      Is it a good idea to have the pictures within the template-folder?
      Wouldn't it be better if you put them into the the images/stories folder of joomla?

      Anyway I can only say that all the gantry methods work for me when I use them in a feature.
      As an example take a look at the features in one of the club templates.
      if yoadd
      <a href="<?php echo $gantry->templateUrl; ?>/images/backgrounds/img-circles.jpg">Test to link to an image in the template-folder</a>
      to the logo.php for example you will see that it works.
      Not sure why they don't work in your file to be honest.
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: SOLVED Adding template path in one of the Gantry Features.

    Posted 13 years 10 months ago
    • ahh I think I found it ...

      change

      function render($position="") {
      ob_start();
      ?>

      to

      function render($position="") {global $gantry;
      ob_start();
      ?>
    • Vikram Rao's Avatar
    • Vikram Rao
    • Rocketeer
    • Posts: 93
    • Thanks: 0
    • Consultant

    Re: SOLVED Adding template path in one of the Gantry Features.

    Posted 13 years 10 months ago
    • Henning wrote:
      tho thats not the problem but:
      where are the pictures you want to show
      your script is searching here
      problogger.kodingen.com/gantry/templates...ow/monsters/img6.png

      But there is no picture-file?

      I would say......Sorry about that as I created these 2 demos in a hurry did not check the image path within the files that are called. However it was not important as the main project was to get the main files via proper syntax. What we put there in those files was anyway not constant. I have changed the paths and they are now pointing to correct images.

      Henning wrote:
      ahh I think I found it ...

      change

      function render($position="") {
      ob_start();
      ?>

      to

      function render($position="") {global $gantry;
      ob_start();
      ?>


      I would say....... Yippee!!! Yes you are right. That was the issue. Adding 'global $gantry;' did the trick. Now they all work perfectly. Checkout http://problogger.kodingen.com/gantry/

      Thanks Henning for taking time to look into the issue. I really appreciate you help very much because a lot of my pending work can now move on.

      Just one more request. Now that this topic stands resolved, can you please move it to the appropriate section.
    • Vikram Rao
      http://www.vikramrao.com
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: SOLVED Adding template path in one of the Gantry Features.

    Posted 13 years 10 months ago
    • Nice ... I must say I was a bit confused 'cause your code loked ok. ;-)
      I'll move this to the gantry solved threads.

Time to create page: 0.054 seconds