How do I program LINKS (a href="??") in navigation
Permalink
...that will ALSO cooperate with auto-nav blocks?
I was using just this format:
<a href="special-events">Special Events</a>
Which worked great! It will take me to:
www.www.mydomain.com/special-events...
PERFECT!
The Auto Nav also takes me to /special-events ...etc.
So both menus work great individually.
The problem I have is when I click "Special Events" (for example) in the Auto Nav in the footer and then click "News" (for example) in the manually-programmed menu up at the top of the website, it goes to this:
www.www.mydomain.com/special-events/news...
instead of
http://www.mydomain.com/news
like I need it to. So, I get a "Page not found"
must be <ahref="page-name">Page Name</a> is not the correct way to manually encode links.
Or perhaps there is a little C5 snippet like <?=$this->getThemePath()?>
that would work?
I was using just this format:
<a href="special-events">Special Events</a>
Which worked great! It will take me to:
www.www.mydomain.com/special-events...
PERFECT!
The Auto Nav also takes me to /special-events ...etc.
So both menus work great individually.
The problem I have is when I click "Special Events" (for example) in the Auto Nav in the footer and then click "News" (for example) in the manually-programmed menu up at the top of the website, it goes to this:
www.www.mydomain.com/special-events/news...
instead of
http://www.mydomain.com/news
like I need it to. So, I get a "Page not found"
must be <ahref="page-name">Page Name</a> is not the correct way to manually encode links.
Or perhaps there is a little C5 snippet like <?=$this->getThemePath()?>
that would work?
Thank you!
Seems to be adding that 'index.php' in there which I thought I got rid of with the htaccess file and sitewide settings.
Yeah, it's not really working right for some reason. It keeps adding extra stuff... every couple clicks I get a new addition and eventually a "Page Not Found" again.
Probably easiest just to hard-code the footer, too. I don't know why I bothered to do the Auto Nav thing, anyway. Pointless in this scenario.
Probably easiest just to hard-code the footer, too. I don't know why I bothered to do the Auto Nav thing, anyway. Pointless in this scenario.
Unfortunately there's an undocumented "feature" where you have to add this to your config/site.php file to make the /index.php/ thing go away:
define('URL_REWRITING_ALL', true);
Thanks! Now I've marked you both as the Best Answer. It must be great to be in on the "ground floor" and know all these tips and tricks and I'm very appreciative of you guys for sharing this knowledge quite freely whenever I bump into these problems.
I am planning on building a C5 site for myself in the next few weeks and want to publish a tutorials section (more like Quick Tips) of all the tidbits I've collected about C5 so far. If I didn't make this list, I would be so screwed, so it has helped me a lot as I continue to make more C5 sites. Is this undocumented feature something you would like me to document in my Quick Tips section? If so--and if there is anything else like this you can think of off the top of your head, I'd love to collect as many Quick Tips as I can and get 'em out there!
I am planning on building a C5 site for myself in the next few weeks and want to publish a tutorials section (more like Quick Tips) of all the tidbits I've collected about C5 so far. If I didn't make this list, I would be so screwed, so it has helped me a lot as I continue to make more C5 sites. Is this undocumented feature something you would like me to document in my Quick Tips section? If so--and if there is anything else like this you can think of off the top of your head, I'd love to collect as many Quick Tips as I can and get 'em out there!
I find my stuff by digging into the core, most of the defines are in the /concrete/config directory,
We know all of these tips and tricks because of practice and working with the system, not because we're on the ground floor (I only started working with C5 last year). I bet next year you'll be answering all of these questions for other beginners :)
I think it's great that you want to share your list of tips and tricks -- but I would encourage you to look at the half dozen or so that are already out there and maybe talk to their authors about improving one list instead of adding yet another one to the mix -- that will only make it more confusing for people, not less.
I think it's great that you want to share your list of tips and tricks -- but I would encourage you to look at the half dozen or so that are already out there and maybe talk to their authors about improving one list instead of adding yet another one to the mix -- that will only make it more confusing for people, not less.
No, I don't think so... I've seen the other C5 tutorials out there. What I've done is pretty different. I've just got numbered Problems and extremely brief solution written below it. It's like a Cheat Sheet where I've condensed a lot of reading of other tutorials, questioning and searching of these forums, video-watching, etc. that I didn't to have to do again when the same problem arises. It's a cheat sheet for a person such as myself who doesn't really know PHP and is very new to this kind of stuff. To give you an idea of where I'm coming from, I read the documentation supplied by the C5 website about blocks and packages and I almost gave up before I even started. I still have no clue how to create a block. I am just beginning to understand enough where I can start THINKING about looking at blocks again. But, before I do that, I'm going to read some of these PHP books I've had laying around for the past couple years.
will make