Link a Category to another url

Respondida

50 Comentarios

  • Mike Tamosaitis

    Should be visible now I just reorder them so it should be the second on in the list now. 

    0
  • Wes Drury

    @Mike - I see it now, can you remove my code and let me play around with the URL

    1
  • Mike Tamosaitis

    Done

    0
  • Wes Drury

    @Mike - I have a live chat widget enabled here.  To speed things up can we chat there and then I can post back the solution as the code is interferring with the code that you have in place for your images.

    1
  • Wes Drury

    @Mike give this a try.

    $('a').each(function() {
    var value = $(this).attr('href');
    if(value=='/hc/en-us/categories/200108526-Technical')
    {
    $(this).attr('href', 'http://google.com');
    $('ul.category-list > li > a[href*="201274123"]').prepend($ScreenBeamCMS + "<br />");
    }
    });

    Remove the code at the bottom of your script starting on line 129.

    2
  • Mike Tamosaitis

    Wes,

    Your the best thanks for the help once again 

     

    Mike

    0
  • Ciro Sirignano

    Hi Mike,

     

    I'm trying to link a section to a URL that link a pdf in our cms.

    I was trying to use the code below but didn't work:

    $(document).ready(function() {:

    //Point Category to external link

    $("ul.section-list li a:contains('Developer Guidelines')").replaceWith('<a href="http://flowsystems.com.au/governance/Land_Housing/Developer_Infrastructure_Works_Guidelines.pdf">Developer Guidelines</a> ');

    Can you help me please?

    Thank you

    0
  • Mike Tamosaitis

    Ciro, 

    Wes is the one who gave me the help on making this work. He might be able to answer your question better than I. 

    Mike

    0
  • Ciro Sirignano

    Hi Wes, 

    can you help me with that?

    I'm trying to link a section to a URL that link a pdf in our cms.

    I was trying to use the code below but didn't work:

    $(document).ready(function() {:

    //Point Category to external link

    $("ul.section-list li a:contains('Developer Guidelines')").replaceWith('<a href="http://flowsystems.com.au/governance/Land_Housing/Developer_Infrastructure_Works_Guidelines.pdf">DeveloperGuidelines</a> ');

    Thank you 

     

    Ciro

    0
  • Wes Drury

    @Ciro - Am I able to get to your HC if so please provide a link and have the code in place.  Also there shouldn't be a semi ":" after your $(document).ready(function() {

    0
  • Ciro Sirignano

    @Wes, 

    Here the HC: https://askus.flowsystems.com.au/hc/admin/appearance#editor

    The code is at the end of the js section.

    thank you very much

     

    0
  • Wes Drury

    @Ciro - It looks like you have some kind of mobile re-direct so I'm unable to see the full Help Center site.  I can't be of much help unless I can see your Help Center.  Its best to make your site responsive and get rid of the mobile as you can't really edit the mobile version with CSS or JS. 

    0
  • Kimberly Morgan

    I have the same question as Kristen, but didn't see any resolution posted for her.

    I want a section container to link to a specified URL.

    I am using the Copenhagen theme.

    Please help!

    0
  • Wes Drury

    @Kimberly - You want a section to point to a specified URL from the Home Page or Category Page or both.

     

    0
  • Kimberly Morgan

    @Wes

    The homepage – our sections are kind of displayed like categories.

    Support.booksamillion.com

    0
  • Wes Drury

    You can actually do this now with the curlybar framework which I would recommend using instead of JQUERY.  I have similar code here but we could do something very similar with the sections.  Give me a little more details and I'll see what I can do.l

    0
  • Kimberly Morgan

    Great! Thanks so much! You can email me if that would be easier.

    0
  • Wes Drury

    @Kimberly - Can you join my SLACK channel and post your Home Page code and let me know what section you are wanting to point to what URL.

    https://moderatorwes.signup.team/

    Once we are done I'll post back the final code revision here for everyone's benefit that way we don't junk up the community with a bunch of code snippets.

    0
  • nishant angaria

    Hi Wes Drury,

     

    I am facing a similar error, but I am not able to redirect my category.

    What I want is that when I click on my Category's icon/space It should redirect to some other page..

    $("ul.category-list li a:contains('test')").replaceWith('<a href="www.google.com"> test</a> ');

     

    Please have a look if I am doing something wrong, or ask for more info if you require

    0
  • Wes Drury

    @nishant - What theme are you using as I have code located here that doesn't use JQUERY if you are using the Copenhagen theme.

    0

Iniciar sesión para dejar un comentario.

Tecnología de Zendesk