Home » Forum
NoNumber!

Joomla!® Websites & Extensions
development  -  support  -  consultancy

I try to respond within 48 hours (excluding weekends).
If I haven't responded by then, feel free to post a reminder or bug me via email.

My last reply was: 3 Hours, 7 Minutes ago.

Welcome, Guest
Please Login or Register.    Lost Password?

Add an anchor to the end of the Joomla URL
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Add an anchor to the end of the Joomla URL
#3916
Add an anchor to the end of the Joomla URL 2 Years, 6 Months ago  
Hi, I've recently designed a couple of sites that customers wanted to have a fairly 'large' header area displaying on the front page. So large in fact that the main menu is nearly at the bottom of your browser window!!! They then asked for pages accessed via any/all menu options to scroll down to show more of the page. I've created an anchor in the index.php file and have been going through component/menu items etc and adding the #anchor_name to the end of the URL, router.php etc, etc. Was just wondering if anyone could think of a way of inserting little bit of text onto the end of the URL using Sourcerer? Some other way? Thanks for any help you can give me...
martyp
Posts: 36
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#3919
Add an anchor to the end of the Joomla URL 2 Years, 6 Months ago  
You could do this automatically with ReReplacer.
Peter van Westen
Admin
Posts: 9169
User Online NowClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#3920
Add an anchor to the end of the Joomla URL 2 Years, 6 Months ago  
Thanks for the headsup re ReReplacer, donwloaded/installed, now all I gotta figure out is regexp's. The majority of URL's end with an Itemid, though some in the front end don't, so I suppose I should just look for the end of the URL line? If the previous 11 characters = my anchor text, do nothing. If not, add my anchor text, think that's possible?
martyp
Posts: 36
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#3921
Add an anchor to the end of the Joomla URL 2 Years, 6 Months ago  
Ahhh, so if I do a replace on every <a href=, find the end of that line ", look for my anchor text, if not there replace it? Am I on the right track...
martyp
Posts: 36
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#3922
Add an anchor to the end of the Joomla URL 2 Years, 6 Months ago  
what you can do is something like this:
Search:
(href="[^"#]*)(")

Replace:
1#anchor_name2

Peter van Westen
Admin
Posts: 9169
User Online NowClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#3923
Add an anchor to the end of the Joomla URL 2 Years, 6 Months ago  
That really is quite incredible, looks like I'll have to make another donation to you ;-} BLOODY BRILLIANT!!! Now I just have to understand the regexp, I turned on regexp to make it work. I'd been looking through every (*&(^(^***ing component to add that blimmin anchor, now I can delete them all, YAHHOOOOO...
martyp
Posts: 36
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#3924
Add an anchor to the end of the Joomla URL 2 Years, 6 Months ago  
Just to explain the regex:
(href="[^"#]*) = grab everything from href to the end of it (grouped in 1)
(") = grab the last " sign (grouped in 2)
[^"#] = every character except " and #
[^"#]* = that and then 0 or more times
Peter van Westen
Admin
Posts: 9169
User Online NowClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
Go to topPage: 1
Moderators: Peter van Westen
MaxCDN | Content Delivery Network | Accelerate your site to the max
hosting joomla
Open Source Training | Online Joomla! Training and Support