Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Custom Snippet Problem

Asked Modified Viewed 1,238 times
F
FTW
F
FTW 14
  • Junior Member, joined since
  • Contributed 30 posts on the community forums.
  • Started 15 threads in the forums
  • Started this discussions
asked
Junior Member

We are in the process of setting up another new site and have a fresh install. We are trying to use the NEWS Snippet to display a title, image and a short description of a news article of a news story, complete with a link to other websites.

So far, we have been unable to get the link to be active UNLESS we allow the visitor to click on the title of the story and go to another page on our site, such as the EXTENDED section of a news post.

We would like to find out if there is a way to use the title of a snippet as a link to another website or incorporate it at some other location within the snippet and then prevent the users from being able to click on the title of the News Article and going to the "extended" section of our site.
Thanks for any ideas on how we can accomplish this goal.
0 replies

3 posts

R
Anonymous User
R
Anonymous User 367
  • Veteran Member, joined since
  • Contributed 939 posts on the community forums.
  • Started 2 threads in the forums
  • Answered 20 questions
answered
Veteran Member

On news index? This function is for index https://github.com/PHPFusion/PHPFusio...hp#L26-L98.

As you can see, snippet is trimmed and all html tags are removed
echo '<div>'.trim_text(strip_tags($data['news_news']), 100).'</div>';


You can simple display entire original snippet just type echo $data['news_news'];

How to customize templates: https://www.php-fusion.co.uk/infusion...ost_209824
0 replies
F
FTW
F
FTW 14
  • Junior Member, joined since
  • Contributed 30 posts on the community forums.
  • Started 15 threads in the forums
  • Started this discussions
answered
Junior Member

Thank You for replying RobiNN, I tried the code that you posted but when bringing up the front page of this new site, where we have the "Latest News" displayed, containing an image and Snippet, we still can not get a html link within the snippet to be active.

Our ultimate goal is to create an aggregate type news site that will display an image and short news lead, then go directly to another site when clicked on. We even considered using the images as a link but have been unable to do that either, by just using the snippets. So at this point, I am not sure if we are inserting the wrong code or if we simply need to move it to another format.
0 replies
R
Anonymous User
R
Anonymous User 367
  • Veteran Member, joined since
  • Contributed 939 posts on the community forums.
  • Started 2 threads in the forums
  • Answered 20 questions
answered
Veteran Member

Aah homepage.. My code was for news index..

The procedure is the same: https://github.com/PHPFusion/PHPFusio...l.php#L102
0 replies

Statistics

  • Views 0 views
  • Posts 3 posts
  • Votes 0 votes
  • Topic users 2 members

2 participants

R
R
Anonymous User 367
  • Veteran Member, joined since
  • Contributed 939 posts on the community forums.
  • Started 2 threads in the forums
  • Answered 20 questions
F
F
FTW 14
  • Junior Member, joined since
  • Contributed 30 posts on the community forums.
  • Started 15 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet