Jump to content

Adding News to Landing page (Page before login)


Nacman

Recommended Posts

Hi there,

 

I have a news item that shows up once you log in.  I would like to have this same News item show up on the first page before login.

 

I have home.blade and app.blade loaded up and I am trying to follow the help part about "DBasic.news /dnews" but I think that is for a menu item. Also looking at the widget section oof the FAQ, but doesn't mention news. This is probably so easy, but it still isn't making perfect sense to me yet.

 

So what would I edit and what would I put in the edit to get news to show up to users who haven't logged in yet or first time visitors.

 

Thanks,

 

-Nac 

Link to comment
Share on other sites

This is not related to an addon route or page (because DBasic.news is a page to display all news, not a widget to place somewhere) ;)

 

What you need to do is, placing latest news widget (which is a part of phpvms v7 itself) to your home.blade.php.

 

You can check the default theme's dashboard/index.blade.php or disposable theme's dashboard/index.blade.php to see how widgets are placed in blades. Also Dispo Basic's readme file explains the general logic about placing widgets and configuring them. Even though it gives examples for its own widgets, similar calls can be used for default widgets (like latest news, latest pireps, latest pilots, livemap etc)

 

Good luck :)

 

Edited by DisposableHero
  • Like 1
Link to comment
Share on other sites

Thank you. I actually was thinking that, based on some of what I saw throughout the code that it could be similar to one or the other, but because of that I was also confused.  I could have tried, but thought it easier to ask, since it is my first outing. 

 

On a side note, I am keeping notes of files (and copy of files) that I have changed to to suit a need. So far succesful, nothing broke yet 🙂.

 

I assume keeping these notes and files is almost mandatory as when a theme or phpvms gets updated they will be over written, correct?

 

Thanks for the code above!!!!!!

-RIchard aka Nacman

Link to comment
Share on other sites

  • Administrators

When you update phpVMS on your site, any core changes will be over written.

Keep a copy of your edited files somewhere safe where they won't get over written.

 

In the Dispo Theme readme, it suggests making a copy of the Dispo Theme and using that copy for your edits. That way, when you update Dispo Theme, it's easy to compare the new files to your edited ones. In essence, this copy becomes your personalized theme. And you don't need to be concerned about over writing edited files.

 

I only copy Dispo files to my theme that I intend to change. If a file in your theme isn't there, it will use the file from the Dispo Theme. Likewise, if the file isn't in Dispo Theme, it will use the file from the default theme.

 

  • Like 1
Link to comment
Share on other sites

21 hours ago, Nacman said:

On a side note, I am keeping notes of files (and copy of files) that I have changed to to suit a need. So far succesful, nothing broke yet 🙂.

 

I assume keeping these notes and files is almost mandatory as when a theme or phpvms gets updated they will be over written, correct?

 

Follow duplication procedure... That simple it is, as explained in @ProAvia's post and is explained with examples in my readme files (subliminal message for reading the readme files) :)

 

Duplication logic works for default theme too, so whatever theme (or my module blade files) you are playing on , duplication saves your life ;)

 

Good luck and enjoy.

  • Like 1
Link to comment
Share on other sites

3 hours ago, DisposableHero said:

 

Follow duplication procedure... That simple it is, as explained in @ProAvia's post and is explained with examples in my readme files (subliminal message for reading the readme files) :)

 

Duplication logic works for default theme too, so whatever theme (or my module blade files) you are playing on , duplication saves your life ;)

 

Good luck and enjoy.

I really have been reading, just not recalling all of it yet. Trying very fast to get the site working so the guys you have joined back up can start flying or I will lose their interest. Trust me, everytime I post with a problem I can't figure out I feel as if it is somewhere to read about it.

 

-Nac

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...