Solved

configure internal link to Drupal 7 installation

Posted on 2013-05-17
9
356 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

 
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
 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
These days socially coordinated efforts have turned into a critical requirement for enterprises.
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

691 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