Solved

configure internal link to Drupal 7 installation

Posted on 2013-05-17
9
346 Views
Last Modified: 2013-06-07
I have a Drupal 7 installation that has links to the site such as:

http://mycompany.com/?q=content/contenttype

I want to make this an internal link so I can clone the site as a test site and not have to go through and make many changes throughout the installation.  Is there some way to refer to this content my an internal link name? The file I want to edit is page--front.tpl.php.

http://localhost/?q=content/contenttype     Does not work.  I think I need to know how to reference it as a node.

<a href="node/??">link<\a    should work but how do I find the node number?
0
Comment
Question by:jimmylew52
  • 4
  • 4
9 Comments
 
LVL 13

Accepted Solution

by:
Arrow_1 earned 500 total points
ID: 39176020
I'm not exactly sure what you're asking here, but you can get the node number by editing the page. You'll see the node number in the path. It will be something like node/10/edit. You can link to it directly using node/10.
0
 
LVL 17

Expert Comment

by:nanharbison
ID: 39176995
You might also want to consider enabling clean URLS on the configure page so your links don't have the q=, which makes the pages better for SEO.
0
 
LVL 1

Author Comment

by:jimmylew52
ID: 39185120
Tells me "Clean URLs cannot be enabled".

I don't see a reference to node on the edit page. I do see

content/content

$q=content/content      looks like it works. I will do some more testing.
0
 
LVL 17

Expert Comment

by:nanharbison
ID: 39185160
Do you have access to the .htaccess file in the root folder? There is a line that has to be uncommented, which will probably make clean URLs possible.In the .htaccess file I am looking at it is line 98 and says:
#   RewriteBase /
take out the #, which will "uncomment it out"
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 1

Author Comment

by:jimmylew52
ID: 39192137
I found the line and commented it. It still tells me clean urls is not available. May have something to do with it running on IIS instead of Apache.
0
 
LVL 17

Expert Comment

by:nanharbison
ID: 39194287
Oh, I don't know much about IIS.
I only have Apache suggestions.
0
 
LVL 17

Expert Comment

by:nanharbison
ID: 39194304
0
 
LVL 1

Author Comment

by:jimmylew52
ID: 39230343
Did not find much on the links but original problem is solved using ?q=content/contenttype .

Would like to enable clean urls but that is a different topic.
0
 
LVL 1

Author Closing Comment

by:jimmylew52
ID: 39230347
Got me close enough to get the job done. Thanks to all that contributed.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now