extracting the record number from _link

3 posts by 2 authors in: Forums > CMS Builder
Last Post: November 19, 2008   (RSS)

Re: [zaba] extracting the record number from _link

By Dave - November 19, 2008

Hi zaba,

What are you trying to do?

How it works by default is detail viewer pages just load the number on the end of the url. So ?anything-here-123 is the same as ?num=123 is the same as ?123

You can get the number from the end of the url like this:

<?php $num = getNumberFromEndOfUrl() ?>

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] extracting the record number from _link

By zaba - November 19, 2008

Hi,
I'll give it a go. What it is I have a text based menu derived from a field in a record. Their are five records. The detail of the page is loaded in the same page dependent upon the text link from the menu. This is all okay, no problem. All I wanted to do was to keep the text link in hover state once the page associated with it is loaded. I was using the number as a variable to cross reference against the record number associated with the menu and if it matched then I would load a different a class so that menu item appeared in the hover state. Thats the only reason and I can't think of an easier way of doing it really. (If that makes sense) I got my way to work, I was just curious.
As an aside though, I am only a few days in, working on 2 projects both incorporating cms builder and so far I love it, what an excellent piece of software. I am sure the more I use it I will be better at it (and pester you guys less). Thanks [;)]