Link Title on Multi Record Listing Page

8 posts by 4 authors in: Forums > CMS Builder
Last Post: March 25, 2009   (RSS)

Hello. I want to make the titles of each page added to this site link to the detail page instead of displaying a raw URL. How do I do this? See what I mean on this page.. http://www.venturacountywinetrail.com/wineries.php

Re: [vividcandi] Link Title on Multi Record Listing Page

By _kate_ - March 23, 2009

Hi,
Simply place the link code -

<a href="<?php echo $record['_link'] ?>"></a>

Around your title e.g.

<a href="<?php echo $record['_link'] ?>">
<?php echo $record['title'] ?>
</a>

Please note - where it says title - you will need to ensure you have entered the name of your title field.

Hope that makes sense! If you have any other questions please feel free to ask :)

Re: [_kate_] Link Title on Multi Record Listing Page

By weblinks - March 23, 2009

Kate...

Your comments are easy to understand... even for me... much thanks! Hope you can help me with this....

I have 4 text fields for individual users [advertisers] to fill in... I need to somehow allow the user to LINK THE TITLE TO THEIR WEB ADDRESS in the [title] field.. Please look at the TEST PAGE BELOW... If I were the user I would want to link "The Vermont Sugar Shack" to my website with a different nam... e.g. http://www.mywebsite..... I KNOW I CAN DO THIS IN A WYSIWYG FORMAT, BUT I DON'T WANT TO GIVE THE USER THIS WHOLE BAG OF OPTIONS... JUST THIS ONE.

YOUR HELP WILL BE MORE THAN APPRECIATED.

http://www.linkvermont.com/TEST/maplesyrup_sugarhouses.php

Best,

Bob T.

Re: [weblinks] Link Title on Multi Record Listing Page

By ross - March 23, 2009

Hi Bob.

I think I understand what you are looking for here. On the test page you linked to, you want the text at the top of the page that says:

Vermont Maple Syrup & Sugarhouses

To link to a website. If that's what you need, my recommendation is to create a new field in that section called "Company URL" or something like that. From there, you can use that new field to create a link like this:

<a href="<?php echo $record['companyURL']; ?>">
<?php echo $record['title'] ?>
</a>


So it's very similar to what Katie gave you but this time, you are using the new field as the link instead of the _link variable.

Does that make sense? Let me know if I can go over this in more detail for you :).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [weblinks] Link Title on Multi Record Listing Page

By ross - March 23, 2009

Hi Bob

Thanks for clearing that up :).

I was looking at the wrong thing before but now that I am on the same track as you, the solution I was thinking of will still work.

What you do is create a new text field called URL or something like that. On the page, you build a link around the title using that new field. Check my previous post for an example of the code.

The first step will be to create that field. Then start building that link.

Keep me up to date :).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Link Title on Multi Record Listing Page

By weblinks - March 25, 2009

Worked great!!! Thanks....

ONLY PROBLEM NOW IS... If the URL Field is left BLANK by the user, the TITLE FIELD SHOWS THE TITLE LINKED to LinkVermont.com... HOW CAN I NOT HAVE THE TITLE FIELD LINKED UNLESS the user places a url in the URL FIELD???

Best,

Bob

Re: [weblinks] Link Title on Multi Record Listing Page

By ross - March 25, 2009

Hi Bob

Where you have the link now, put an if block around it like this:

<?php if ($record['url']: ?>
<a href="<?php echo $record['url']; ?>
<?php endif ?>

As always, you may need to tweak that a bit so the variables match up, but that's the basic idea.

Let me know if this gets things going. Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/