Jump to content

Error Notice appearing in HTML


Danjuan
 Share

Recommended Posts

Hi

I have created a slideshow that uses child pages as the slides and the image is taken from a field called hero_image within that child page.

The images are showing for the slides but there's an issue, well a couple.

#1

When right clicking the site and inspecting the element, I have 3 notices on the page all pointing towards line 7 which I've pasted below:

echo "<div class='slide' id='hero-slide-$child->title' style='background-image: url({$child->hero_image->url})'>$child->title</div>";

In the hero_image field:

Maximum Files: 1

Formatted Value: Single Item

#2

When clicking through the slides, the url address changes and adds /#section1/1, /#section1/2 etc depending on what slide.

I do not want this and can't find a way to stop it. I want the address bar to be www.blahblahblah.com unless i go to that child page, then it will be www.blahblahblah.com/page1

Thanks

Link to comment
Share on other sites

#1

 

When right clicking the site and inspecting the element, I have 3 notices on the page all pointing towards line 7

Please tell us what these notices actually say. Having the code is only half of the story here :)

#2

 

When clicking through the slides, the url address changes and adds /#section1/1, /#section1/2 etc depending on what slide.

This is probably the behaviour introduced by the slider library that you are using, so it would be a good idea to check their documentation to see if it can be changed or removed.

Link to comment
Share on other sites

#1) For debugging purposes it would be good if you could also show us the rendered line 7.

#2) The #-Links are probably added by the slider. Are you using a PW module or a third party library to generate your slider?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...