Jump to content

Is it possible to read the content of one or more specific pages and place them on the landingpage


aarbee

Recommended Posts

I have created a copy of the default layout, and I ask myself if it is possible to add news and read out a specific page(s) so that I can edit them via the admin module instead of constantly changing the home.blade.php?

 

I managed to put the latest news items there via {{ Widget::latestNews(['count' => 3]) }}
But I wonder how to read out a page.

 

Thanks ahead.

 

RobB

Link to comment
Share on other sites

Try using html / iframe or with some php (and laravel) knowledge you can read data with curl (or guzzle) and then process it or you can place widgets to that home.blade.php once and then forget it completely.

 

It all depends what you need and how you want to do it but most of the time anything is possible.

 

Good luck

 

 

  • Confused 1
Link to comment
Share on other sites

Ow. Confused. 
I know html, but an iframe will show evertything including the header and footer, which is not what I want.
I tried this SQL command, which is showing the body in mysql, but it simply prints the command in my html.

 

I tried to understand Laravel and Curl, but it is not giving me what I want. So I tried some php and sql, but that did not work either.

$sql = "SELECT body FROM `pages`\n"
. "where id=\"1\";";

 

But thanks for trying to point out/help.

 

RobB

Link to comment
Share on other sites

As I wrote in my first reply, it all depends on what you want to achieve, the method will then become relevant...

 

I would not recommend running connections and sql queries inside blade files but in the end it is your va and install, it will be up to you :)

 

Good luck.

  • Like 1
Link to comment
Share on other sites

 

what I want is a frontpage, with public access without login and some text, images, lets say info.
And the content/body should be extracted out of a page that was created in the admin, under pages.
Only 1 one page, so the info is easy to edit in a html environment, instead of editing the php page with html elelements.
Not specific for me, but other admins, are not good at html.

I know HTML/CSS.

 

RobB

Link to comment
Share on other sites

9 hours ago, aarbee said:

 

what I want is a frontpage, with public access without login and some text, images, lets say info.
And the content/body should be extracted out of a page that was created in the admin, under pages.
Only 1 one page, so the info is easy to edit in a html environment, instead of editing the php page with html elelements.
Not specific for me, but other admins, are not good at html.

I know HTML/CSS.

 

RobB

 

So you want a "landing page", preferably outside of phpvms v7 namespace, something like a wordpress website which you can edit as you wish. It may not be that easy to achieve, because v7 "pages" system is not designed for that purpose. You can still have it by some tricks and injection logic of laravel but I am not sure that it will give you the best results out of the box.

 

At minimum, you may need a modified app.blade.php which will be used only for that home.blade.php, and in that home.blade you can load a "page" created at admin side by (or maybe you can load more as per your design needs). And then display it without escaping html special chars, so it can be displayed as designed in a WYSIWYG editor.

 

Or you can have a real landing page, with any CMS you like to use (like WP or Joomla etc) and have your phpvms v7 located under a subdomain like many of VA's around. Imagine https://phpvms.net (landing site) and https://demo.phpvms.net (phpvms v7)

 

Good luck

  • Like 1
Link to comment
Share on other sites

Understood.
Just to be clear, I like PHPVMS and gives me what I need. (I checked other tools too, that do the same a year ago, but I decided to continue with v7 after v2 and v5) I just wanted to make the startingpage a bit better and easier to maintain by other staffmembers.
But I can live with it by maintaining the frontpage myself, as it is not being changed that much.

 

Thanks for the advice.

  • Like 1
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...