Hi Nancy,
As asked I opened a different issue for node-theming.
What I liked about the links_weblink module, that the url was possible to place within the node-title so you got:
Node-title
Node-teaser/body
visit URL (with through node.tpl.php options to show the url itself or the node-title in this field).
See this node on my website http://www.best-information.eu/grand-hotel-belle-vue. You do not see any link (so no dirty text). But when you click on visit.. than you go immediately to the website from the url.
Could weblinks please also get the possibility for theming, especially through node-weblinks.tpl.php to show the url itself or the node-title, with the same behaviour possibilities?
As you described on /weblinks page it is looking great!
Greetings,
Martijn
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | weblinks_example.jpg | 35.61 KB | nancydru |
Comments
Comment #1
nancydruI have been looking at the Links package and it does not do "theming" of the node. It does format it differently and does give you the option of saying "Visit" rather than showing the URL.
Comment #2
summit commentedHi Nancy,
Sorry if it is my mistake, but I do not see the link itself, which is better when the link is ugly.
Hopefully there is a way with web links also to "masker" the link, so you see the node title, but the link is underneath, or better maybe a field which is the same as the link-text in a normal tag?
Thanks for going into this so thoroughly Nancy, very much appreciated!
greetings,
Martijn
Comment #3
nancydruIf you chose the option to see the URL, did it still say "Visit"?
The code to do this is not hard, but I wanted some javascript for the settings and that is turning out to be a bear.
Comment #4
nancydruI have thsi all working fine except that pesky little JS problem.
Comment #5
summit commentedHi Nancy,
Visit was hardcoded unfortunately in links_weblink. But better to have it user-choosen what word it would be to show.
Next to this, thinking about it, it would be great if the node-title and the text you see as hyperlink would be user-chosen.
So you got:
Node-title: Say "Papageno"
Url: Say "http://www.dno.nl/index.php?as=3&c=sounds&m=archive&s=28&sm=archiveSeasons"
And an option to set
Url-text: Say "Muziektheater papageno uitvoering"
So please add this as an extra field.
This way the link looks nice and the user has the ability to show the link with different text than the node-title, which is also good for SEO purposes :)
greetings,
Martijn
Comment #6
nancydruActually, for SEO purposes I think it would be better to re-use the title as that would increase the "keyword density." And doing this would require another database change, which hits a bunch of code.
I thought about adding a configurable "Visit" text. We are getting to the "settings glut" point so I'd like to find another way. And the JS problem I'm having is related to trying to better manage the volume of settings that we have.
Comment #7
summit commentedFor SEO purposes it is better to not completely reuse, but be able to tune the node-title and url-text as you like.
More flexibility. The best would be an option to use or the url, or the node-title or another field.
I am not having problems with to much settings if they are valuable and effective!
Looking forward what you build from it!
greetings,
Martijn
Comment #8
nancydruOkay, Martijn, I am committing this as it is now. Please test it and let us know how it does for you.
Comment #9
summit commentedHi Nancy,
Testing this as fast as I can. What I see you added a above/underneath view option, thanks!
I would very much appreciate the possibility, may be only through theming if otherwise not possible to show a different field as link-text. See how: http://www.operas.nu/papageno is now.
The css posibilities gives a much better layout, but to get rid of the ugly link showing on the page would be great!
Are there posibilities for this. May be something like (altered which I used for another module) for node-weblinks.tpl.php:
greetings,
Martijn
Comment #10
nancydruMartijn, there are new options under "View Settings". If you choose the "Visit" option of "Link displays as", you should get what you asked for, with no URL.
Comment #11
summit commentedYesYes! It is working thanks! Set this to closed.
Great this option to set your own visit text!
I will this weeks, very bussy, but will try also convert the bigger site best-information.eu to web links.
Let you know how the converting goes.
Thanks for implementing this feature!
greetings,
Martijn
Comment #12
nancydruSince there is valuable information in thi issue, let's let it stay visibly in the queue for two weeks, at which time it will close automatically.
To say the least, Robert and I had an interesting challenge in this one.
Comment #13
summit commentedHi Nancy & Robert,
You guys are great!
Nancy which other module of you do I need to use now for other problems I still have on my sites...:)
greetings,
Martijn
Comment #14
nancydruNo, I'm not letting you near any more of my modules... ;-)
Comment #15
summit commentedHi Nancy,
Sorry to open this again. Using Weblinks Drupal 5 RC7
I finally have the node-override working with panels. So I got on Weblinks node page the possibility to show other panel-panes next to the node itself.
See www.vindtocht.nl/salsa-en-tango-weekend-maastricht. The %title is not shown anymore after "Bezoek direct" which means Visit in dutch.
I think this is because panels itself uses %title.
EDIT: May be this is connected to: http://www.drupal.org/node/213751#comment-969268
Wandering if for now, not the %title, but immidiately the node-title can be gotten or may be the title token.., so panels does't interfere with the %title..
Sorry again for opening this, but you can imagine I hit my head also to the table when I finally had panels node-override working as explained here http://drupal.org/node/206185 and terms showing and than seeing that the %title is not showing anymore...
Thanks a lot for going into it again!
greetings,
Martijn
Comment #16
nancydruDoes the "Visit" settings in the settings page actually say "Visit %title" -- yes "%title" must actually be there. I can't imagine why Panels would be messing with content data - this is not part of the node title to be displayed.
Comment #17
nancydrusorry, posted twice
Comment #18
summit commentedHi Nancy,
Yes the visit setting says "Visit %title". I made it now "Visit" for testpurposes as you can see on: http://www.vindtocht.nl/niet-duur-ski-hotel-bij-verbier
Panels messes somehow with the title, pagetitle module doesn't work also correct with panels.
greetings,
Martijn
Comment #19
nancydruWhile I'm figuring out what to do, have you opened an issue on Panels?
Comment #20
nancydruMartijn, do you have the Token module?
Comment #21
summit commentedHi Nancy,
Yes, I have the token module!
greetings,
Martijn
Comment #22
nancydruGood, now if you were only on 6.x... I have a working version on 6.x using Token which should avoid Panels problems; I need to back port it and create an update function.
Comment #23
summit commentedHi Nancy,
Sorry, Panels itself is what me withhold the most going to 6. Panels is not ported yet.
And all sorts of modules I use are not on 6 yet. So sorry I have to stay on 5 for a while..
Thanks for backporting!
greetings,
Martijn
Comment #24
nancydruYeah, I'm still waiting for Spam and AcidFree.
Okay, Martijn, here you go. After you download, run update.php. Then, if you have Token enabled, go to your settings and check under the "visit" text. Lots of Token toys to play with.
Comment #25
summit commentedHi Nancy,
Yep all sorts of tokens work, except....cry,cry, the [title] token.
I will make an issue on the panels.module. Banging my head again to the table.taken a cup of coffee.
Report you back what comes out of Panels. Cry, cry...
EDIT: May be this is the case: http://drupal.org/node/213751#comment-969268
It looks like node.tpl.php doesn't have control over the node-title.
Every token works, except the title token.
I build this in my node-weblinks.tpl.php..and it didn't work also..
but I think on Weblinks level it is fixed..or you should build a new variable, $node->weblinks-title or something than I think it will show up under panels.
Greetings,
Martijn
Comment #26
nancydruWell, this is definitely a Panels problem then.
Comment #27
nancydru@Martijn: Lots more tokens, including [weblinks-title] and [weblinks-title-raw]. They will be in the next -dev release.
Comment #28
summit commentedHi Nancy,
It is not working..I also think it is a panels problem.
What I do know is that using another $node fields works!
I also have the ad module, in that module a $node->adheader is build (this is the same as the node-title) and then it works.
I build this in my node-weblinks.tpl.php..and it didn't work also..
So using another $node field will work, something like $node->weblink_title next to the title.
The $node->title will not work. In panels there is a discussion this is because theme and panels want to take charge over the title.
Greetings,
Martijn
Comment #29
nancydruMartijn, go into the system table and locate the Panels module and set its weight up to something like 5 - definitely higher than Web Links and Token. Hopefully that will give us a chance to grab the title before they delete it. If that doesn't work, I can add code to grab the title out of the database again. Mark the Panels issue as "critical" because it is breaking your site.
Comment #30
summit commentedHi Nancy,
I have moduleweight installed. Panels-pages and panels have already a value of 10 both. Weblinks 0 and Token 0. I set token to 5, but no success.
I just think that the title is big issue with panels. The issue on which I replyed is already critical: http://drupal.org/node/213751#comment-971868
Will try the patch stated there asap.
Greetings,
Martijn
Comment #31
nancydruIn token_weblinks.inc at approximately line 36 you will find
$tokens['weblinks-title'] = decode_entities(check_plain($object->title));Immediately before that line, insert:
Let me know if this takes care of it.
Comment #32
summit commentedHi Nancy,
Success!! The code is {node} n, but thanks a lot for all your effort!!!
It gives another query, so I think this is a temporarely solution, when Panels solves http://drupal.org/node/213751. But thanks you so much for your great support for now!!
Greetings,
Martijn
Comment #33
nancydruFabulous. I committed that fix to both branches.
Comment #34
nancydru