Need to change url for home in autonav
Permalink 1 user found helpful
Hello,
I have a concrete5 site but I also have a static index.htm page that houses a intro video.
My problem is that when you click on the home button (set up via autonav) it sends the user to the intro video page instead of taking them to the home page of the concrete5 site.
It does this because even though home has link of index.php the autonav simply sends home link to /
You can see what I am talking about here:http://www.onlinetabletennisvideos.com/agent/index.php...
Hover over or click on Home link the header.
How can I change this home link in autonav to go to index.php instead of just /?
I have a concrete5 site but I also have a static index.htm page that houses a intro video.
My problem is that when you click on the home button (set up via autonav) it sends the user to the intro video page instead of taking them to the home page of the concrete5 site.
It does this because even though home has link of index.php the autonav simply sends home link to /
You can see what I am talking about here:http://www.onlinetabletennisvideos.com/agent/index.php...
Hover over or click on Home link the header.
How can I change this home link in autonav to go to index.php instead of just /?
Probably a better idea out there, but Concrete5 live in a level down couldn't it? i.e. so the Concrete5 install folder is in the same folder as the index.html.
Not sure I entirely understand.
I will even simplify my example for all those out there.
Here is the other installation of it that I am using (nearly identical sites):http://www.tabletennisactionunlimited.com/index.php...
Same issue. If you click on Home link it takes you back to index.htm intro page that I have set up. This is not how I want it to work.
It is odd that for all pages besides Home that the autonav puts in index.php/nameofpage (Of course it has to but for sake of consistency it should for Home also (just merely have the index.php)
I know others have done changes to autonav block so if anyone could chime in and let me know how to do this that would be great. Merely looking to change Home link in Concrete5 from / to index.php/ which is what it should be to begin with in my opinion.
I will even simplify my example for all those out there.
Here is the other installation of it that I am using (nearly identical sites):http://www.tabletennisactionunlimited.com/index.php...
Same issue. If you click on Home link it takes you back to index.htm intro page that I have set up. This is not how I want it to work.
It is odd that for all pages besides Home that the autonav puts in index.php/nameofpage (Of course it has to but for sake of consistency it should for Home also (just merely have the index.php)
I know others have done changes to autonav block so if anyone could chime in and let me know how to do this that would be great. Merely looking to change Home link in Concrete5 from / to index.php/ which is what it should be to begin with in my opinion.
hi,
what myFullFlavour was suggesting is that you install concrete5 into a subfolder e.g:
http://www.tabletennisactionunlimited.com/concrete5/...
or any folder you'd like to create.
That way you will avoid the issue when people go to the root of your website they will see your index.html and then when they go to
http://www.tabletennisactionunlimited.com/concrete5/... they will be inside the Concrete5 website.
By default the sitemap will parse out any .php extension you put in there.
One way to achieve what you want without adversely affecting any rewrites etc would be to
create a page attribute with the handle 'isHomePage'
apply this attribute to the homepage
create a copy of concrete/blocks/autonav/view.php
in
/blocks/autonav/view.php (you will probably have to create the autonav folder under /blocks
then modify your new view.php (the copy):
under the piece of code:
if (!$pageLink) {
$pageLink = $ni->getURL();
}
add
if ($_c->getCollectionAttributeValue('isHomePage')) {
$pageLink="/index.php";
}
without changing anything else.
Remember to avoid messing with the core code make a copy and use that.
There may well be better solutions that someone might post but that should give you what you want.
what myFullFlavour was suggesting is that you install concrete5 into a subfolder e.g:
http://www.tabletennisactionunlimited.com/concrete5/...
or any folder you'd like to create.
That way you will avoid the issue when people go to the root of your website they will see your index.html and then when they go to
http://www.tabletennisactionunlimited.com/concrete5/... they will be inside the Concrete5 website.
By default the sitemap will parse out any .php extension you put in there.
One way to achieve what you want without adversely affecting any rewrites etc would be to
create a page attribute with the handle 'isHomePage'
apply this attribute to the homepage
create a copy of concrete/blocks/autonav/view.php
in
/blocks/autonav/view.php (you will probably have to create the autonav folder under /blocks
then modify your new view.php (the copy):
under the piece of code:
if (!$pageLink) {
$pageLink = $ni->getURL();
}
add
if ($_c->getCollectionAttributeValue('isHomePage')) {
$pageLink="/index.php";
}
without changing anything else.
Remember to avoid messing with the core code make a copy and use that.
There may well be better solutions that someone might post but that should give you what you want.
Thank you for the code change example AndyJ.
However unless I did something wrong (and I don't believe I did) then it made no change for me.
Do I need to change word "isHomePage" to the name of my home page?
http://www.tabletennisactionunlimited.com/index.php/...
However unless I did something wrong (and I don't believe I did) then it made no change for me.
Do I need to change word "isHomePage" to the name of my home page?
http://www.tabletennisactionunlimited.com/index.php/...
Hi,
no - I think you have misunderstood...
Create a new page attribute with the handle 'isHomePage'.
In the admin side of your website go to
'Pages and themes'
click on the attributes tab
at the bottom of the page there is a title
'Add Page Atribute' and a dropdown
select checkbox
click go
make sure the handle is isHomePage - the name can be the same,
don't change anything else on that page
click 'add attribute'
go to sitempap
click on homepage
click properties
go to custom attributes tab
add youur hoomepage attribute from the dropdown
scroll all the way to the bottom and you'll see the check box
check it and save
no - I think you have misunderstood...
Create a new page attribute with the handle 'isHomePage'.
In the admin side of your website go to
'Pages and themes'
click on the attributes tab
at the bottom of the page there is a title
'Add Page Atribute' and a dropdown
select checkbox
click go
make sure the handle is isHomePage - the name can be the same,
don't change anything else on that page
click 'add attribute'
go to sitempap
click on homepage
click properties
go to custom attributes tab
add youur hoomepage attribute from the dropdown
scroll all the way to the bottom and you'll see the check box
check it and save
Perfect! Thanks again.
Hi Andy,
I have followed everything in this post and when I look at the link when I rollover it, it shows the correct page to go to but when I exit edit mode, it reverts back to the root url. Anything I should look at to fix this?
Thanks!
I have followed everything in this post and when I look at the link when I rollover it, it shows the correct page to go to but when I exit edit mode, it reverts back to the root url. Anything I should look at to fix this?
Thanks!