Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Get a link to look in a certain folder ??

Guest
Mar 12, 2008 Mar 12, 2008
I have a DB that the search engine will look through for business names, type and where they are located, but when the results come back is it possible to have the link for that company link only to the folder for that company? So that way they only get the information from that folder?

Don't know if that make sense to you, but hope it does.

Thanks in advance
505
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 13, 2008 Mar 13, 2008
Would GetDirectoryFromPath() Do what i need here?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 14, 2008 Mar 14, 2008
K0rrupt wrote:
> Would GetDirectoryFromPath() Do what i need here?


I wouldn't expect it to, but then I have very little idea what you want
to do?

Yes you can have links to a directory, which will then load the default
file as defined in the web server. How this relates to your data I have
no idea, I have never seen your data.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 19, 2008 Mar 19, 2008
Well what i needed done is that...
Step 1: The user when they use the search engine it will use the database to get all the businesses that is in the website.
Step 2: On the result page it will of course show the business name, type of business and city it is located in.
Step 3: The company Name would be a link that i wanted to link to the folder of that company.

Every company will be in its own folder, for example: Jane's hair salon would be in folders "company/British Columbia/Vancouver/janes hair salon.

Hope that made it more clear of what i needed the link to do. So if a company is in lets say Alberta the link would take it to the company/Alberta/Calgary/John's body shop. See what i mean?

Hope you can help me with this. This is the only thing stopping me from finishing the site.

Thanks again
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 20, 2008 Mar 20, 2008
K0rrupt wrote:
> Step 3: The company Name would be a link that i wanted to link to the folder
> of that company.

Then you would just build a link based on the business rules of how your
file system is laid out. OR store the link as a field in the company
database and just output it. The latter is a bit easier, more reliable
and less prone to data disconnects. But either will work.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 20, 2008 Mar 20, 2008
Could you show me an example? Pretty new to cf.
I was thinking of having the link go to a process page and thought of this code, but it doesn't work. Am i going into the write direction or is it all wrong? I was thinking of having the link add the company name, province and city they are in and have the process page determine which folder is the correct one according to the URL params.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 21, 2008 Mar 21, 2008
LATEST
K0rrupt wrote:
> Could you show me an example? Pretty new to cf.
> I was thinking of having the link go to a process page and thought of this
> code, but it doesn't work. Am i going into the write direction or is it all
> wrong? I was thinking of having the link add the company name, province and
> city they are in and have the process page determine which folder is the
> correct one according to the URL params.
>
> <cfif IsDefined("URL.Province")>
> <cfset ThisPath = ExpandPath("menu")>
> <cfset ThisDirectory = GetDirectoryFromPath(ThisPath)>
>
> <cfif URL.Province EQ ThisDirectory>
> <cflocation url="#ThisDirectory#" />
> </cfif>
> <cfelse>
> <cflocation url="../index.cfm" />
> <cfabort>
> </cfif>
>

Ok, that looks rather complex, but I am not sure what your goal is here?
Are you building links or doing some type of redirect for some reason?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources