The code calls a function that doesn't exist: basepath(). It should be base_path() which isn't working very well either. It is returning a link http://node/932

 if (isset($result->nid)) {
            $slider_items[$key1]['slide_read_more'] =  l('Read more...', basepath() . 'node/' . $result->nid);
            $slider_items[$key1]['slide_node'] =  basepath() . 'node/' . $result->nid;
          }

Comments

ppblaauw’s picture

Status: Active » Needs work

Thanks for reporting.
Strange that base_path() does not work.
Will upload new version soon after some more testing.

ppblaauw’s picture

Status: Needs work » Fixed

New version uploaded without the base_path() in the l() function.
It is not needed here. The l() function will take care of the path.

Adam S’s picture

Well, there was another problem. In the link for some reason 'node/' is being 'tokenized'. I'm getting the URL plus the node's title. Not sure why. So instead of http://example.com/node/384, I getting http://example.com/title-of-node???

I solved it by editing the CCK form. I removed the name of the body so I don't have a body anymore. Then I made another text field with a machine name 'rotator_link' which I labeled 'Read more link.' I wasn't sure if I was supposed to add a field to the view so I did anyway. This way with just a drag and drop I can link to any content on my site. Much nicer.

Here is the code in the template.php file:

 // add slide_read_more variable and slide_node variable
          if (isset($result->nid)) {
			$readmore_link = $result->node_data_field_pager_item_text_field_rotator_link_value;
            $slider_items[$key1]['slide_read_more'] =  l('Read more...', $readmore_link);
            $slider_items[$key1]['slide_node'] =  $base_url . 'node/' . $result->nid;
          }

I also changed the css to make the frame longer and shorter. With the funky Image Crop widget http://drupal.org/project/imagefield_crop anybody who adds an image has to, mandatory, crop it the correct width, height ratio. Very cool stuff.

When I get paid for this project I'll send you a Sunday donation. Thanks for the development!

ppblaauw’s picture

http://example.com/title-of-node

is the alias for

http://example.com/node/384

which is good

The solution and code you use now is similar to: How to link Read more... button to another page instead of the node

Have a look at it. It also adds a little bit more flexible option to use the link you have in textfield and if not available it uses the link to the node.

I used the imagecache_actions module for automatic actions on images but not the imagefield_crop module. Will have a look at it.

Thanks again

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.