Jump to content


Photo
- - - - -
Resolved

Adding Anchor Tag To Banner Titles



  • Please log in to reply
21 replies to this topic

#1 hireconrad

hireconrad

    Super Member

  • Members
  • 155 posts
  • Country: Country Flag

Posted 07 November 2012 - 12:59 AM

Hi,
i have added anchor tags on banner titles to aid site navigation. It was working great until the most recent pagelines update. Now I've had to remove them because part of the html shows up on the page

I would add something like this:

<a name="banner 1"></a>Banner Title

Posted Image

how can i get the anchor tag to appear with the banner title?
If i add it in the content of the banner instead, then the title of the banner is cut off from view when linked

#2 James B

James B

    Advocate

  • Members

  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 07 November 2012 - 02:48 AM

Hi there, I think you need to tweak the html slightly to

Please Login or Register to see this Hidden Content



#3 hireconrad

hireconrad

    Super Member

  • Members
  • 155 posts
  • Country: Country Flag

Posted 07 November 2012 - 02:51 AM

Hi there, I think you need to tweak the html slightly to

Please Login or Register to see this Hidden Content


Tried that and it didn't make a difference.

Please Login or Register to see this Hidden Content



#4 James B

James B

    Advocate

  • Members

  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 07 November 2012 - 04:40 AM

Ok looking in your source code it's mixing up your html and adding it as an alt name for the image above.

Please Login or Register to see this Hidden Content


Try adding your text into a separate Div, I've just done the same on my test site. Screenshot -

Please Login or Register to see this Hidden Content



Please Login or Register to see this Hidden Content



#5 hireconrad

hireconrad

    Super Member

  • Members
  • 155 posts
  • Country: Country Flag

Posted 07 November 2012 - 04:46 AM

Ok looking in your source code it's mixing up your html and adding it as an alt name for the image above.

Please Login or Register to see this Hidden Content


Try adding your text into a separate Div, I've just done the same on my test site. Screenshot -

Please Login or Register to see this Hidden Content



Please Login or Register to see this Hidden Content


Are you suggesting I not add a banner title, and put in the title in the body of the banner instead?
Ive tried wrapping the banner title in a div, but it doesn't fix the issue.

Any idea why the code is being messed up? a pagelines bug? (it used to work fine until the newest update).

#6 Danny

Danny

    Is Awesome!

  • Moderators
  • 17015 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 07 November 2012 - 10:11 AM

Hi,

Can you tell me where abouts your adding this anchor code please.

#7 hireconrad

hireconrad

    Super Member

  • Members
  • 155 posts
  • Country: Country Flag

Posted 07 November 2012 - 02:51 PM

Hi,

Can you tell me where abouts your adding this anchor code please.


I have been adding them to the title field of the banner (it used to work, until the newest update of pagelines).

#8 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 07 November 2012 - 02:59 PM

It used to work, as there was a bug, the alt was always blank, you were exploiting a bug!

A customer pointed it out and the bug was fixed, the image alt is always the banner title now.

If you want to change that html there is a filter provided. Take a look at the banners section.php

#9 hireconrad

hireconrad

    Super Member

  • Members
  • 155 posts
  • Country: Country Flag

Posted 07 November 2012 - 03:04 PM

It used to work, as there was a bug, the alt was always blank, you were exploiting a bug!

A customer pointed it out and the bug was fixed, the image alt is always the banner title now.

If you want to change that html there is a filter provided. Take a look at the banners section.php


I opened up the section.php in the banners section and I can't figure out what where to find the filter.

#10 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 07 November 2012 - 04:50 PM

Line 278 of section.php

#11 hireconrad

hireconrad

    Super Member

  • Members
  • 155 posts
  • Country: Country Flag

Posted 07 November 2012 - 04:52 PM

Line 278 of section.php


i have a very rudimentary understanding of javascript. Could you explain to me what i would need to do to modify it?

#12 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 07 November 2012 - 05:02 PM

Change that block of code to this:


Please Login or Register to see this Hidden Content



#13 hireconrad

hireconrad

    Super Member

  • Members
  • 155 posts
  • Country: Country Flag

Posted 07 November 2012 - 08:49 PM

Change that block of code to this:


Please Login or Register to see this Hidden Content


I modified the section.php as suggested and it did not help. there is even more text below the image then before. When i look at the code using firebug, the code is being messed up around the banner image, while the banner title looks good.

#14 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 07 November 2012 - 10:21 PM

I dont understand what you are trying to do, you are using a link as your title?? A link with no destination?

#15 hireconrad

hireconrad

    Super Member

  • Members
  • 155 posts
  • Country: Country Flag

Posted 07 November 2012 - 10:34 PM

I dont understand what you are trying to do, you are using a link as your title?? A link with no destination?


i am using <a name="whatever"></a> as an anchor for site navigation. Using the anchor tag I can use page navigation and navbar navigation.

#16 Danny

Danny

    Is Awesome!

  • Moderators
  • 17015 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 08 November 2012 - 09:45 AM

The easiest way (not tested) would be to use CSS to hide the Banner title and then use <h1>Banner TItle</h1 in the Banner content editor. Then add your anchor there, this should work and is the easiest way of achieving the functionality you want.

#17 hireconrad

hireconrad

    Super Member

  • Members
  • 155 posts
  • Country: Country Flag

Posted 08 November 2012 - 03:14 PM

The easiest way (not tested) would be to use CSS to hide the Banner title and then use <h1>Banner TItle</h1 in the Banner content editor. Then add your anchor there, this should work and is the easiest way of achieving the functionality you want.

I was hoping to avoid this, but i guess i will do this instead.

#18 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 08 November 2012 - 04:08 PM

Let us know if you need help with the CSS.

#19 hireconrad

hireconrad

    Super Member

  • Members
  • 155 posts
  • Country: Country Flag

Posted 08 November 2012 - 04:10 PM

Let us know if you need help with the CSS.


Thanks, but I think i have it down:

Please Login or Register to see this Hidden Content


Please Login or Register to see this Hidden Content



#20 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 08 November 2012 - 04:12 PM

Do you need further assistance with anything else?





Also tagged with one or more of these keywords: Resolved