Link Title on Multi Record Listing Page

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

By vividcandi - March 23, 2009

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: [_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: [ross] Link Title on Multi Record Listing Page

By weblinks - March 23, 2009

Hi Ross.

Sorry that I didn't word my question so that it would be more clear...

No, I' m not trying to link [font "Verdana"]Vermont Maple Syrup & Sugarhouses to a web page...

[font "Verdana"]I am using CMS to allow users [many, I hope], with a password and user id I will provide... to create a TEXT AD in the right column of some of my web pages... NOT UNLIKE GOOGLE ADS....

[font "Verdana"]I wish to use all TEXT FIELDS so that the user doesn't have access to all of the bells and whistles in a wysiwyg field... However, I WISH TO ALLOW THE USER TO LINK THE TEXT... IN THE TITLE FIELD [TEXT FIELD] TO HIS OR HER WEB ADDRESS...

[font "Verdana"]Please look at my testing page... http://www.linkvermont.com/TEST/maplesyrup_sugarhouses.php

[font "Verdana"]I wish that the user can LINK the words [font "Arial"]The Vermont Sugar Shack [font "Verdana"]in the right column to his or her website... Is there a way of using html code on this field so that this can be done???[/#000000][/#0000ff]

[font "Verdana"]Bob

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/