Support Forums

URL Open in New Window

This is a discussion on URL Open in New Window within the Templates, HTML, CSS, and Design Help forums, part of the General category; Hi. I'm pretty new to 68 Classifieds. I want to create a category that is a TOP category that when ...


Go Back   68 Classifieds Forums > General > Templates, HTML, CSS, and Design Help

Reply
 
Thread Tools Display Modes
Old 06-10-2009, 08:03 PM   #1
Junior Member
 
Join Date: Jun 2009
Posts: 9
Rep Power: 0
christianpeddler is on a distinguished road
Default URL Open in New Window

Hi. I'm pretty new to 68 Classifieds. I want to create a category that is a TOP category that when clicked it goes to a URL. No problem there. However... How do I get the URL to open in a new window? I dont want users to exit my 68 Classifieds site, I just want to present them with a new window of information.
Thanks
christianpeddler is offline   Reply With Quote
Old 06-10-2009, 08:52 PM   #2
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,947
Rep Power: 72
seymourjames is a jewel in the rough
Default

Please post your 68 Classifieds type (Designer, Developer), version (4.0.x, 4.1.x) and template in your postings asking for help. This information will help you get better answers for your posts. A great place to do this is in your signature!

It is not normally good practice to start opening new windows and is rarely a marketing benefit. I presume these urls however are sitting on another domain.

There are many ways to do this. A search on html will tell you how to do things like this. One easy way is to put target="_blank" in the link

<a href="http://gotothisothersite.com" target="_blank"">Go to this other site!</a>

However, you need to be more clear about what you are actually trying to do.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds
seymourjames is offline   Reply With Quote
Old 06-10-2009, 08:53 PM   #3
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,493
Rep Power: 132
Eric Barnes is just really nice Eric Barnes is just really nice
Default

This would take the developer edition but open the includes/classes/kernel/Categories.php file and find this:
$rs['start_link']='<a href="'.$rs['cLink'].'" title="'.$rs['name'].'">';

Next add the target = blank:
$rs['start_link']='<a href="'.$rs['cLink'].'" title="'.$rs['name'].'" target="_blank">';
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 06-11-2009, 09:36 AM   #4
Junior Member
 
Join Date: Jun 2009
Posts: 9
Rep Power: 0
christianpeddler is on a distinguished road
Default URL Open in new window

Thanks for the info and your patience as I work through this stuff.

Developer Package V4.1

Web site using 68Class I'm trying to setup is ChristianPeddler.com. Two categories, Resources and Church Directory. I have those setup as TOP categories with a category link to another website we have. When those categories are clicked, I want the other website to open in a new window. Since these are just resource pages, I really dont want the user to leave the "main" site.

I'll try putting in the format you suggested in the category link and see how it acts.
<a href="http://gotothisothersite.com" target="_blank"">Go to this other site!</a>

Again THANK YOU for all your hellp.
Greatly appreciated.
christianpeddler is offline   Reply With Quote
Old 06-11-2009, 11:55 AM   #5
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,947
Rep Power: 72
seymourjames is a jewel in the rough
Default

Why don't you just put these links in the sidebar for example in layout.tpl . Call them what they are and then pop them if necessary. It is more likely to annoy people if a window pops open when they think they are clicking on a category. Many many people just bin websites if they start popping windows in a less than logical way.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds
seymourjames is offline   Reply With Quote
Old 06-11-2009, 04:49 PM   #6
Junior Member
 
Join Date: Jun 2009
Posts: 9
Rep Power: 0
christianpeddler is on a distinguished road
Default URL open in a new window

Thanks again for the reply. Sidebar? The trouble there is making it happen. Do you have any code/info on creating it? I like the idea but I'm not too sure how to code it. I'll search the forums to see if there is info on it. I am using the default template.

Thanks
christianpeddler is offline   Reply With Quote
Old 06-11-2009, 05:13 PM   #7
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,947
Rep Power: 72
seymourjames is a jewel in the rough
Default

In your default template layout.tpl file, place your links in the sidebar.

Something like this like this

<ul class="sidemenu">
<li><a href="{$smarty.const.URL}/index.php">{$smarty.const.LANG_TPL_HOME}</a></li>
<li><a href="{$smarty.const.URL}/search.php">{$smarty.const.LANG_TPL_SEARCH}</a></li>
{foreach from=$templatepages item="entry"}
<li><a href="{$smarty.const.URL}/pages.php?pg={$entry.pURI}">{$entry.pPageTitle}</a></li>
{/foreach}

<li><a href="http://gotothisothersite.com" target="_blank"">Go to this other site!</a></li>
<li><a href="{$smarty.const.URL}/contactus.php">{$smarty.const.LANG_TPL_CONTACT}</a></li>

{modulehook function="tpl_layout_nav" options=""}
</ul>

They will then always be viewable.



put your link
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds
seymourjames is offline   Reply With Quote
Old 06-11-2009, 05:45 PM   #8
Junior Member
 
Join Date: Jun 2009
Posts: 9
Rep Power: 0
christianpeddler is on a distinguished road
Default URL open in a new window

THANK YOU! I took your last advice and opened up the Layout.tpl. Found out where & how to add the links to the left side of the screen. Your code confirms I was on the right track.

Many THANKS for all your help!
christianpeddler is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
cant open template files in cpanel fc2008 Technical Support 3 05-07-2009 12:55 PM
Please, CLARIFY --.. 99% of source code is open.. -- Stefanbg Pre Sales Questions 1 03-13-2009 11:51 AM
How can I open the smarty debug mode james Technical Support 2 03-03-2009 10:02 PM
Making a 'seller' sale without the site being officially open Chaslie Site Marketing 5 05-11-2006 10:57 AM


All times are GMT -4. The time now is 06:50 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0