Results 1 to 2 of 2

Thread: change the url to seo friendly when using Tab Content script v2.0

  1. #1
    Join Date
    Feb 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default change the url to seo friendly when using Tab Content script v2.0

    1) Script Title: Tab Content script v2.0

    2) Script URL (on DD): http://www.dynamicdrive.com/forums/s...nt+script+v2.0

    3) Describe problem:Hi is it possible to change the url to SEO friendly i.e remove the query string ?sometext=sometext to /sometext when accessing the tabs via a remote link ?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,069
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    That's not going to be SEO friendly unless there is a page at the address that you want the search engine to crawl to. In any case, you can have any URL you like as the href. Change (from "Dynamically selecting a tab using a remote link" on http://www.dynamicdrive.com/dynamici...suppliment.htm):

    Code:
    <a href="target.htm?flowertabs=1">Target Page</a>
    to:

    Code:
    <a href="whatever.htm" onclick="window.location = 'target.htm?flowertabs=1'; return false;">Target Page</a>
    Ideally the whatever.htm page would be the page that would get loaded into the content division. In the case of this example:

    Code:
    <div id="flowertabs" class="modernbricksmenu2">
    <ul>
    <li><a href="external1.htm" rel="flowerdivcontainer" class="selected">Tab 1</a></li>
    <li><a href="external2.htm" rel="flowerdivcontainer" rev="flowernote,flowernote2">Tab 2</a></li>
    <li><a href="external3.htm" rel="flowerdivcontainer">Tab 3</a></li>
    <li><a href="external5.htm" rel="flowerdivcontainer" rev="flowernote3">Tab 4</a></li>
    <li><a href="http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/">Ajax Tabs script</a></li>
    </ul>
    </div>
    <br style="clear: left" />
    
    <script type="text/javascript">
    
    var myflowers=new ddajaxtabs("flowertabs", "flowerdivcontainer")
    myflowers.setpersist(true)
    myflowers.setselectedClassTarget("link") //"link" or "linkparent"
    myflowers.init()
    
    </script>
    it would be:

    Code:
    Code:
    <a href="external2.htm" onclick="window.location = 'target.htm?flowertabs=1'; return false;">Target Page</a>
    However, you would then want a script on external2.htm to load target.htm with external2.htm in its tab. So on external2.htm put:

    Code:
    <script type="text/javascript">
    if(loacation.href.indexOf('/target.htm') < 0){
    	window.location.replace('target.htm?flowertabs=1');
    }
    </script>
    In fact, if you have that, you should be able to skip the onclick event. Try it both ways to see what happens.

    The browser cache may need to be cleared and/or the pages refreshed to see changes.

    If you want more help, please include a link to the pages on your site that contain the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Similar Threads

  1. Tab Content Script (v 2.2) Search Engine Friendly?
    By stuckagain in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 06-24-2011, 12:01 AM
  2. Tab Content Script: Change content selector to class
    By konstikonst in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 02-05-2011, 07:50 PM
  3. Printer Friendly script ?
    By chrbar in forum PHP
    Replies: 1
    Last Post: 05-21-2008, 11:28 PM
  4. Ajax Tabs Content Script - Not Search Engine Friendly
    By GaGGe in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 12-12-2007, 09:10 PM
  5. Great DD script could use a FF-friendly update!
    By jyeager in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 04-18-2007, 12:56 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •