AGuyFawkesMask Posted February 1, 2012 Report Share Posted February 1, 2012 Hi all, I'm interested in modifying the news_additem.tpl file such that the subject field will display the subject, but also be a link at the same time. i.e. NOTAM: Electronic kneeboard technology now available in the Downloads section I've added a field to my phpvms_news table called "redirect_link" and I've edited my news_newsitem.tpl such that it appears as follows: <a href="<?php echo $redirect_link; ?>"><?php echo $subject; ?></a> I added the following line to news_additem.tpl <input type="text" name="redirect_link" value="<?php if(isset($newsitem->redirect_link)) { echo $newsitem->redirect_link; }?>" size="100%" /> I also added some lines to SiteCMS.php in the admin/modules folder. However, when the link is displayed on my site, it's not doing anything and is displaying the link to the page I'm currently on. Also, I see that the link is being placed in the body field in the phpvms_news table upon adding/editing a news item via the admin panel. Can anyone guide me through which lines I need to add/edit in my SiteCMS.php file? I believe this is where the error is originating. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
AGuyFawkesMask Posted February 1, 2012 Author Report Share Posted February 1, 2012 UPDATE: I realized I also had to edit SiteData.class.php and was able to get the admin center to input the link into the right field in my phpvms_news database, but I can't get it to display the appropriate link on my site. Any ideas? Quote Link to comment Share on other sites More sharing options...
AGuyFawkesMask Posted February 2, 2012 Author Report Share Posted February 2, 2012 UPDATE: Problem solved. Realized I forgot to edit the news.php module Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.