Open/Create blog post page on OctoberCMS - laravel

I used this link:
Hide content of blog posts when displaying blog post list in OctoberCMS?
as a tutorial to create a new plugin and show my blog posts by my own style (just post title, date, etc)
But now I need to show the full content of the post. I've migrated from wordpress, where each post creates a new page automaticaly. Does OctoberCMS do the same thing? If yes, how can I relate the post title to the post page. (if not I'll create a "read more" link and show the content on the same page, but, if the users get redirect to the post page, it would be great!)
thanks!
Regards

October CMS is not like word-press, To make posts you need actual plugin and with in that plugin you can add models/tables for you post data
Then you need to create components which can show your records to front-end.
If you are not using rainlab-blog plugin then you need to do this stuff
So basically you need to create this things :
Page where you want to list all post and then add listposts component which will show list of posts (you need to make it manually) then for that component you need to pass single post detail page
For single post again you create new page add another component which can read slug and show respective post data
For redirection from post list to single post you need to create link as you are passing single post detail page to component you can create link with slug and redirect to single post page
For better reference check out https://octobercms.com/plugin/rainlab-blog plugin and read its documentation and code
Then you understand how things works.
Its kind of pain to do thing manually as you are coming from wordpress, But it will give you more control and more flexiblity
Once you made your plugin you can fully Extend it and reuse it as you want.
if any doubt please comment.

Related

Facebook feed dialog deprecating custom fields

Facebook Feed Dialog 2.9 has deprecated the custom fields (name, caption, picture, description) - https://developers.facebook.com/docs/sharing/reference/feed-dialog.
I'm working on an AJAX site where all content and metadata is loaded dynamically. If I just use the link property, the metadata isn't set on initial retrieval of the page so the post doesn't contain the right content.
How can I share an AJAX page on Facebook without having to go down the route of prerendering static pages server side? Thanks
If you can program your page to populate the appropriate metatags on the page load based off of a variable http:/yoursite.com/yourpage.php?thisversion=1 then when you want to share version 1 of the page, you just share the URL with the appropriate variable to populate it. You can still remain on your current version of the page but when you share the URL that would prompt that specific version, facebook makes a call to that respective URL and pulls the appropriate metatags that would be populated by your variable without having to reload the page your are currently displaying. Sorry I don't have time at the moment but will try and comeback and add some sample code for clarity.

How to load custom post data into a sidebar using ajax?

I have a list of custom posts, and I want to have a sidebar, wherein the information associated with a post selected from the list to load.
If you insist on using ajax to do this then you will need an API for your WordPress site to call back into. Take a look at http://wp-api.org/. It won't necessarily be easy, but you should be able to get it setup and running and then put a piece of JavaScript in a widget to make the call and display the data.
Be careful, that plugin is under active development.
IMO, it would be easier to do this without ajax. Off the top of my head I would say that you could define a shorttag in your functions.php file and then put it in your widget. If the widget appears on a page with a post, pick up the post id, fetch the meta data, and display it.
Cheers!
=C=

Joomla component - how to convert standard php form into joomla component

Currently i have been using an iframe component to display a php page that i have written. the reason i used iframe rather than writing a joomla component in the first place was for 2 reasons, the information that is displayed in that page is from a remote mssql sever and the second was that i didnt really understand how to write one.
Now i have completed the creation of the php page that i display within the iframe, but now i need to be able to have it inherent within the joomla site, for both display reasons and security.
basically its a single page that displays information in a bunch of drop down boxes and then a submit button is clicked and it posts that information to another php page that again queries the mssql server and displays the results based on the post from the previous page.
query.php, posts some variables to results.php and is displayed in a table.
i have the functionality perfect, but i dont understand the documentation i have read so far. is there any simple component i can see the code of so that i can try and work out whats going on?
You might want to look at http://docs.joomla.org/J3.1:Developing_a_MVC_Component/Introduction and follow the process outlined.

Ajax Load more Articles button not working when posts filtered from tag or month

I have created a post filter option which allows the user to filter posts by the month or the post tags.
The issue I am having is when I click on any of the filters it filters the posts using ajax and loads the appropriate posts but when I try and click the load more posts button it reloads the page without actually accessing the ajax script.
On the home it works perfectly and for the tags if I refresh the page then use the button it works properly as well.
I am not sure what exactly might be causing this to happen. I think it might be the way I am displaying my posts.
Any help would be appreciated also if you need any code or anything please ask I shall provide you with it.
Thanks.

What to put in HTML snapshot for hash-bang URL for SEO?

I am using hash-bang URLs in my AJAX application and I am implementing the server-side for:
handle ?_escaped_fragment_=key1=value1%26key2=value2
So when I look at Google's FAQ, it says that this URL has an equivalent snapshot
It is easy to see that the snapshot content is not the same as corresponding hash-bang url. This Google example does not help and therefore my question:
My HTML page has three components/panels/sections that are being updated by AJAX. I use the onclick event on the hash-bang URLs to fetch the content from server and then update relevant section of the HTML page. My panels are updated independent of each other and each panel has its own hash-bang URL .
My question is:
Should the HTML snapshot contain the entire page with all 3 sections or only the updated section?
If I am to return the entire page, it is almost impossible to get the state of the other 2 sections correctly, so would the Googlebot reject my site if the other 2 sections are returned in their default state ?
this is a good question, sadly no answer for this one :( im looking for the same. My problem is that EVERYTHING are news loaded with ajax, so each news is actually a little peace of text so im asking myself if my snapshots should be only the current new or a full page with all the info that i have in my home plus current new's content
Do you have news about that topic ?

Resources