Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Linking in the same page?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
matureprofiles
Smarty n00b


Joined: 27 Sep 2008
Posts: 3

PostPosted: Sat Sep 27, 2008 7:43 pm    Post subject: Linking in the same page? Reply with quote

How do you link in the same page when using smarty templates? Obviously there is some sort of magic trick for this as the traditional tried and true way absolutely does not work when using templates. the html attributes
<a name="top">page top</a> and
<a href="#top">Back to the top of the page</a>
DO NOT WORK WHEN USING TEMPLATES. Clinking one of these links takes you to the sites home page!!!
Please someone show me the david blane magic trick to make this work, i have a long page on how to's and would love to make it easier for people to navigate my page.

Also I am having a problem with javascript, yes I know you have to eclose functions in {literal} {/literal} tags, the problem is the functions can't be accessed later in the file when you need them, all you get is error on page in the status bar, I was trying to use javascript to open links in a new window of a certain size, this works fine when used in a plain html file, just like the above html attribute works fine in an html file. Smarty is not looking so smart to me, it seems like it just makes more work and more hassle, especially if something so simple as linking in a page does not work, really come on man what is the magic trick here.
I personally would never have used smarty to build a site, but the site I am in charge of modifing is made with smarty so I am now forced to learn not only a new language but also all the tricks to make the traditional things work.
I have been searching the forum for the answers but can't seem to find them, so any help would be great.
Back to top
View user's profile Send private message Send e-mail
t3hAndy
Smarty Rookie


Joined: 10 Sep 2008
Posts: 12

PostPosted: Tue Sep 30, 2008 9:29 am    Post subject: Reply with quote

have you tried {ldelim} and {rdelim}?
Back to top
View user's profile Send private message
blackhawkmx
Smarty Regular


Joined: 20 May 2005
Posts: 76

PostPosted: Wed Oct 01, 2008 5:05 am    Post subject: Reply with quote

As far as your HTML goes, you should be able to test out your issues. on your .tpl file, set up a test button like so....

Code:

<a href="#test">test me</a>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<a name="test">go here</a>


when you click on test me, do you still have the same issue of page redirection? or does the current page scroll down to the "go here" button? Also are you working with a masked URL?

As far as your javascript goes, you can test that out too by placing a javascript style next to the source thats using it. for example...

Code:

{literal}
<script>
alert ("pop me open");
</script>
{/literal}


see if this works on the your .tpl page. hopefully these little steps can lead to the bigger issues.

bh
_________________
Bring it back to basics. You and I can make it right!
Back to top
View user's profile Send private message
matureprofiles
Smarty n00b


Joined: 27 Sep 2008
Posts: 3

PostPosted: Sat Oct 11, 2008 11:26 pm    Post subject: Reply with quote

yeah the code for inner page linking I used was just like that and it did not work, what is a masked URL? Question
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP