I have a Homepage channel setup with a homepage field group.

Within the field group, there is a homepage_slider Grid field and within that Grid there is an image and page_link field.

When called in via the following {homepage_slider:image} renders correctly (the image shows without issue.

However, using the following:

<a href="{homepage_slider:page_link}{homepage_slider:page_link:pager}{/homepage_slider:page_link}">

Renders only as:

<a href="{/">

Outside of the it appears to work and display the correct page_uri.

Looking at the syntax, it looks like it should be OK and I've trawled through the other settings inside the CMS without much luck in terms of debugging. I've also incrementally removing elements of the template and the problem occurs as soon as the element goes inside of the <a href=""> tag.

EDIT: Here is the full code block:

<div class="slide">
    <a href="{homepage_slider:page_link}{homepage_slider:page_link:page_uri}{/homepage_slider:page_link}">{exp:ce_img:single src="{homepage_slider:image}" width="960" height="450" crop="yes"}</a>

(Note: Running EE 2.8.1)

  • Could you post the full template code for the homepage slider block. from opening homepage_slide to closing tag
    – CreateSean
    Jul 23 '14 at 15:30
  • Sean, updated original post with code block, as requested. Jul 23 '14 at 15:38
  • Why is the page_link field a tag pair? What type of cell is this? I would think your link should work with href="{homepage_slider:page_link}"
    – CreateSean
    Jul 23 '14 at 15:46
  • Just realised that I didn't mention the page_link field is a Relationship field within the Grid. My apologies. Jul 23 '14 at 16:04
  • You call the grid field homepage_slide in your post, but then reference homepage_slider (with an 'r') - Which is correct? Jul 23 '14 at 17:36

I'm not sure why the page_link is a tag pair or what page_link:pager is. Could you elaborate on that?

It looks to me like the correct code should be:

<div class="slide">
    <a href="{homepage_slider:page_link}">{exp:ce_img:single src="{homepage_slider:image}" width="960" height="450" crop="yes"}</a>
  • Sean, we need the page_uri in there so that the specified product can be linked. We've used similar setups to this previously without issue. Jul 23 '14 at 15:53
  • is the relationship cell playa or native - if playa can you set a var_prefix? do you want page_uri or page_url?
    – CreateSean
    Jul 23 '14 at 16:07
  • It's a native Relationship field. It's not the first time we've had issues with the native Grid/Relationship fields, I was just hoping we've gone code blind and missed something. Jul 23 '14 at 16:10

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.