User Guide of Magento 2 Blog Extension
After installing the extension, ensure that the setup is upgraded, and static content is deployed. Log in to the admin panel and flush the Magento cache storage.
In the back end, navigate to FME EXTENSIONS > Configurations. Here you will find the following settings:
Configurations
Article Settings
- Blog Enable: Option to enable or disable the module
- Enable Header Link: Select 'Yes’ to enable the header link for the module
- Header Link Title: Enter a title for the header link
- Enable Footer Link: Select 'Yes’ to enable the footer link
- Footer Link Label: Enter a label for the module's footer link
- Article Mode: This option allows you to choose between list view or grid view for the main articles page
Recent Post Block
- Enable Recent Posts: Select 'Yes’ to enable recent post block
- Enable RSS Subscription: Select 'Yes’ to enable RSS feeds
- Recent Posts Title: Enter a title for recent posts block
- No. of Posts: Enter the number of posts to limit the posts appearing on the recent posts block
Post Video Gallery
- Enable/disable videos gallery: Select 'Yes’ to enable video gallery on the article detail page.
SEO Configurations
- Page Title: Enter a page title for main articles page -** Description:** Enter a meta description for the main page
- Keywords: Enter keywords for articles main page
- Slug: Enter the identifier to access your module (e.g. http://www.example.com/article). In this case, the article is the slug
- URL Suffix: Enter a suffix like .htm or HTML
- Category Page URL: This option allows you to access the category page either through a category id or via URL key
Camera Slider Settings
- Select Animation: Select a desirable animation for the carousel slider at articles main page
- Pause on Hover: Select ‘Yes’ if you wish to pause the carousel on mouse hover
- Loader: Select a loader for carousal like pie, bar, none - Show Navigation Button: Select ‘Yes’ if you wish to show next and previous buttons on the carousel slider
- Show Pagination: Select ‘Yes’ if you wish to show pagination
- Slide Duration: Enter slide duration for the slider like 1500, 2500, 3500. This is a required field
Article Detail Settings
- Show Attached Products: Select ‘Yes’ if you wish to display the attached product with an article on the article detail page
- Show Sharing Option: Select ‘Yes’ if you wish to allow the user to share the article on social networking sites
- Show Related Posts: Select ‘Yes’ if wish to display related articles with an article on the article detail page
- Allow Comments: Select ‘Yes’ if you wish to let the user comment on an article on the article detail page
Article Comments
- Enable Anti-Spam Check: Select ‘Yes’ to activate antispam checks
- Google Recaptcha Key: Enter the Google ReCaptcha key that you created for your site
Recent Comments Block
- Enable / Disable Block: Select ‘Yes’ if you wish to enable the recent comments block
- Block Title: Enter a suitable title for your recent comments block
- Show No. of Comments: Enter a number which will determine the number of comments to be displayed on the recent comments block
Facebook Comments
- Enable Facebook Comments: Select ‘Yes’ to activate Facebook comments option on the article detail page
- App ID: Enter your Facebook App ID
- Number of Posts: Enter a number to limit the number of Facebook comments on the front end
Search Block
- Enable Block: Select ‘Yes’ to enable the search block
- Search Button Title: Enter a suitable title for the search button
- Search Block Title: Enter a suitable title for the search block on articles main page and article's detail page
Articles Tab On Product Page
- Enable / Disable Block: Select ‘Yes’ if you wish to display the articles tab on product detail page – articles will appear on the product which is attached with articles in the admin section of Manage Articles
- Tab Title: Enter a suitable title for the articles tab on the product page
- Show No. of Articles: Enter a number to limit the number of articles appearing on the product detail page
Categories Block
- Enable Block: Select ‘Yes’ if you wish to enable the categories block
- Block Title: Enter a suitable title for the categories block
- Show No. of Categories: Enter a number to limit the number of categories appearing on the articles main page and detail page
Facebook Page
- Enable Facebook Block: Select ‘Yes’ if you wish to enable the Facebook block
- Hide Cover Photo: Option to hide Facebook cover photo
- Use Small Header: Enable/Disable small header
- Show Friend's Faces: Options to display the friend's profile picture
- Facebook Page URL: Enter your Facebook page URL example: https://www.facebook.com/[your_page]/
- Width (px): Enter the Width of the Facebook block in pixels
- Height (px): Enter the Height of the Facebook block in pixels
Twitter Page
- Enable Twitter Block: Select ‘Yes’ if you wish to enable the twitter block
- User Name: Enter the user name of your twitter page
- Widget ID: Enter the widget id of your twitter page (Hint: Create a widget "https://twitter.com/settings/widgets”, copy and paste code from "data-widget-id" attribute)
- **Height (px): **Enter the Height of the Twitter block in pixels
Layout And Theme
- Article Layout: Select the layout for the article's module
- Empty
- 1 Column
- 2 Columns with Left Bar
- 2 Columns with Right Bar
- 3 Columns
GraphQL APIs
1. Get Blogs
Description: To retrieve all articles, or to fetch them by identifier or ID.
Parameters: filter{}
, pageSize, currentPage
Filter Parameters : {articles_id:{$id}
, identifier: ${“identifier”}
,search_term:{$search_term}
author_id:{author_id}}
articles_id : Int
title : String
article_publish_date : String
image : String
thumbnail:String
identifier : String
articlesdetail : String
author : String
rating : String
video_url : String
article_meta_title : String
article_meta_keywords : String
article_meta_description : String
artilce_short_summary : String
creation_time : String
update_time : Int
is_active : Int
featured : Int
article_layout:String
related_products:[String]
Query
{
blog(
filter: {articles_id:1}
pageSize:1,
) {
blogs_media_url
blogs_data {
articles_id
title
identifier
articlesdetail
related_products
}
}
}
2. Get Blog with Author
Description: To retrieve the author's details of the blog.
Query
{
blog(
filter: {articles_id:1}
pageSize:1,
) {
blogs_media_url
blogs_data {
articles_id
article_layout
article_meta_description
author {
author_id
name
short_description
image
social_links {
facebook_profile
instagram_profile
tiktok_profile
linkedin_profile
twitter_profile
youtube_profile
}
}
}
}
}
-
Get Next & Previous Blog
Description: To retrieve the next and previous articles of a specific article.
{
blog(
filter: {articles_id:1}
pageSize:1,
) {
blogs_media_url
blogs_data {
articles_id
article_layout
article_meta_description
next_article {
articles_id
identifier
title
}
previous_article {
articles_id
identifier
title
}
}
}
}
-
Get Authors List
Description: To retrieve the list of authors or filter them by either author ID or URL key.
{
author(
filter: {url_key:"rami-jabali"},pageSize:12
) {
author_id
name
urlkey
jobtitle
meta_title
description
short_description
meta_robots
meta_title
social_links{
facebook_profile
instagram_profile
tiktok_profile
}
}
}
-
Get Blog Categories
Description: To retrieve all categories, or filter them by URL key or ID, along with the blogs inside.
Parameters: filter{}
, blogpageSize,blogcurrentPage,pageSize,currentPage
Filter Parameters: { category_id:{$id}
, url_key: ${“url_key”} }
articles_id : Int
title : String
article_publish_date : String
image : String
identifier : String
articlesdetail : String
author : String
rating : String
video_url : String
article_meta_title : String
article_meta_keywords : String
article_meta_description : String
artilce_short_summary : String
creation_time : String
update_time : Int
is_active : Int
featured : Int
article_layout:String
related_products:[String]
Query
{
blogcategories(
filter: '{}',blogpageSize:1,blogcurrentPage:2,pageSize:2,currentPage:1
) {
category_id
category_name
creation_time
blogs_count
blogs {
identifier
articles_id
categories{
category_id
category_name
category_url_key
is_active
}
}
}
}