Adding RSS Feed

Nova includes a new and robust way of skinning the entire system without ever touching the core of the application. If you have questions about how to build a theme for Nova, how to modify a theme or you just want to show off your work, this is the place to do it!

Wolf Wed Jul 04, 2018 9:35 pm

Adding RSS Feed

It's been a while since I've been on here, but, I've run into an issues and have been through every file I can think of. I'm attempting to add a tab to the main page for an RSS feed from my orgs site. I've managed to get it set up mostly.

There are a few issues I'm running into. First, I cannot seem to get it to recognize the SQL enty that says turn it on. I have attempted to add it to the control panel settings with this in _base_override/admin/pages/site_settings.php:

Code: Select all
            <p>
               <kbd><?php echo $label['fnews_show'];?></kbd>
               <?php echo form_radio($inputs['show_fnews_y']);?>
               <?php echo form_label($label['yes'], 'show_fnews_y');?>

               <?php echo form_radio($inputs['show_fnews_n']);?>
               <?php echo form_label($label['no'], 'show_fnews_n');?>
            </p>


That gets me a yes/no radial with no label and it will not save the input.


correction: I found the tab lables and fixed those, just need help with the adding it to settings now

So, any help would be appreciated

Posts: 167


AgentPhoenix Thu Jul 05, 2018 9:27 am

Re: Adding RSS Feed

Nova 2 has a feature to add a user-created setting. Have you used that feature to add your item to the settings page?
User avatar

Posts: 7550


Wolf Thu Jul 05, 2018 9:46 am

Re: Adding RSS Feed

no, and honestly because I wasn't sure how to put it in there that way, I was backwards engineering the code, that's how I learned most of what I know about php is from doing that with Nova :)

note: I actually have settings fixed, it is entering and drawing from the SQL now (literally just now). I missed a letter in the coding and needed coffee to see it lol. Still need to get it to show on the main page though. get the feeling that's something simple I'm missing too

Posts: 167


AgentPhoenix Fri Jul 06, 2018 8:59 pm

Re: Adding RSS Feed

Hint: nova_settings_model...
User avatar

Posts: 7550


Wolf Sat Jul 07, 2018 7:41 am

Re: Adding RSS Feed

I think it's over my head, lol. I think I'm just going to leave it as is, with showing the fleet news perm rather than turning it on and off in settings, I keep breaking it trying to make it work. I really do appreciate the help though!

Posts: 167


AgentPhoenix Sat Jul 07, 2018 11:36 am

Re: Adding RSS Feed

From your controller method, you should be able to just do this:

Code: Select all
$data['settingValue'] = $this->settings->get_setting('your-setting-key');

That will also make sure it's available in the view for you to use as $settingValue (or whatever you want it to be).
User avatar

Posts: 7550


Wolf Sat Jul 07, 2018 1:55 pm

Re: Adding RSS Feed

Oh cool thank you!!

Posts: 167



Return to Skinning

Who is online

Users browsing this forum: No registered users and 3 guests

cron