1

Fairly new to ExpressionEngine. I'll try to briefly summarize what I'm trying to achieve since I haven't found any answers as of yet, which have properly worked.

I have an image gallery template, with the images being shown by a channel loop. When one is clicked, instead of simply showing the image by itself (by a permalink, I presume) in the same template style, I'd like for it to be shown in a separate template, so for example the image could be seen shown in a larger size, along with whatever other info: caption, etc.

I've tried linking the images to {url_title_path='template_group/template'} so that I could generate the same channel entry in another template - and it seemed to work, however all my images (besides the ones uploaded through the channel) were missing. Perhaps because I'm using relative image paths? I still don't know what image url method is best for ExpressionEngine.

On top of that, my {path='home'} link which is the url to my index didn't work anymore as well.

So what would be the best solution to linking the same channel entry to another template?

1

What you need to use is {title_permalink} and you'd pass in the template_group/template that you want to link to to display your image. For instance:

{title_permalink="image/view"}

Where 'image' is your template group and 'view' is your template to display a single image. The URL will something like:

mydomain.com/index.php/image/view/image-name

'image-name' will be the title of your image entry.

For the second issue regarding your link to the home page, ensure that home is the name of your template group and that this template group is set as the default template group - indicated by the pink star next to it. This follows the same suit in being set to template_group/template so if that doesn't work then include the index page:

{path="home/index}
| improve this answer | |
  • Awesome, thank you. I realized as well I simply had "index" as my href to my homepage. Now it makes sense as to what was causing the home-link problem. – JackArrgon Mar 28 '13 at 17:29
  • No problem. It's usually just getting used to EE's path handling process but always remember the template_group/template pattern. – Ian Mar 28 '13 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.