The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> PHP Development
|
Display terms as text, not link
Discuss Display terms as text, not link in the PHP Development forum on Dev Shed. Display terms as text, not link PHP Development forum discussing coding practices, tips on PHP, and other PHP-related topics. PHP is an open source scripting language that has taken the web development industry by storm.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

November 21st, 2012, 12:47 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 7
Time spent in forums: 1 h 48 m 17 sec
Reputation Power: 0
|
|
|
Display terms as text, not link
Hi folks,
I've got a tiny issue. I want to display terms as "text" and not as a "link". The code is
|

November 21st, 2012, 12:58 PM
|
|
|
1) Please edit your post and enclose your code in [ PHP ] tags. See ManiacDan's New User Guide.
2) Since I don't see anything that is generating a link, you need to be more specific. What do you mean by text instead of a link? Show HTML examples of what you get vs. what you want.
__________________
There are 10 kinds of people in the world. Those that understand binary and those that don't.
|

November 21st, 2012, 01:07 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 7
Time spent in forums: 1 h 48 m 17 sec
Reputation Power: 0
|
|
|
thanks for the reply.
At the bottom you'll see "apartment amenities". The amenities listed are all displayed as a link but I want to display as text.
|

November 21st, 2012, 01:23 PM
|
|
|
|
What I meant was that the code you posted does not generate any links. You need to post the code that produces those links. Off hand I'd say simply remove the '<a>' tags surrounding the text. But without seeing that code I can't say for sure.
|

November 21st, 2012, 01:34 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 7
Time spent in forums: 1 h 48 m 17 sec
Reputation Power: 0
|
|
|
That's actually the entire code for that part.
What's about this part:
|

November 21st, 2012, 01:39 PM
|
|
|
|
Nope. Somewhere there has to be code that generates something like:
<a href="..... > some text</a>
That is what makes "some text" into a link. To remove the link just remove the <a> tags as I said.
|

November 21st, 2012, 01:41 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 7
Time spent in forums: 1 h 48 m 17 sec
Reputation Power: 0
|
|
|
Unfortunately no <a> tag.
|

November 21st, 2012, 01:56 PM
|
|
|
|
Its there. Here is the HTML source from your page that needs to be fixed.
<a href="/apartment-amenities/general/hardwood-floors" rel="tag" title="General">Hardwood Floors</a>
That obviously must exist somewhere since it is being output.
|

November 21st, 2012, 01:58 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 7
Time spent in forums: 1 h 48 m 17 sec
Reputation Power: 0
|
|
|
Yes, it's automatically generated. It's nothing I typed into the code. The PHP code I sent in the beginning produces this output.
|

November 21st, 2012, 02:01 PM
|
|
|
|
Then it must be hard coded in the HTML somewhere and not produced by any PHP code. It then becomes an HTML question not a PHP question. In either case you have the answer. Just find it and fix it.
|

November 21st, 2012, 02:15 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 7
Time spent in forums: 1 h 48 m 17 sec
Reputation Power: 0
|
|
|
when I replace the whole shown code with the following one it works... but it also removes other stuff I need hence I need another solution:
|

November 21st, 2012, 02:22 PM
|
|
|
|
Then you have not posted all the necessary code. For example, where is $node defined and where is it set?
|

November 21st, 2012, 02:58 PM
|
|
Registered User
|
|
Join Date: Nov 2012
Posts: 7
Time spent in forums: 1 h 48 m 17 sec
Reputation Power: 0
|
|
|
Somehow I think that this part makes the link
I accomplished to remove the links by rewriting this code but it also shows some errors.
|

November 21st, 2012, 04:44 PM
|
|
|
__________________
I ♥ ManiacDan & requinix
This is a sig, and not necessarily a comment on the OP:
Please don't be a help vampire!
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|