Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home page Blog #21

Closed
virani06 opened this issue May 8, 2016 · 8 comments
Closed

Home page Blog #21

virani06 opened this issue May 8, 2016 · 8 comments

Comments

@virani06
Copy link

virani06 commented May 8, 2016

when I call blog list page in home page of magento than i got error
i call in cms_index_index.xml

i got following error
Fatal error: Call to a member function setPost() on a non-object in C:\wamp\www\Magento_Parasnath\app\code\Magefan\Blog\Block\Post\PostList.php on line 29

what to do??

@magefan
Copy link
Owner

magefan commented May 8, 2016

@virani06 how you try to call it? Could you provide some code?
Try to add layout code similar to view/frontend/layout/blog_post_list.xml and view/frontend/layout/blog_index_index.xml

By the way, from the last commit you can add resent posts to any CMS page or block using magento widget functionality.

@virani06
Copy link
Author

virani06 commented May 8, 2016

<block class="Magefan\Blog\Block\Index" name="blog.posts.list" template="post/list.phtml" /> i use this line of code in my cms_index_index.xml
can you check it?

@magefan
Copy link
Owner

magefan commented May 9, 2016

try to you something like this in index page layout

<block class="Magefan\Blog\Block\Index" name="blog.posts.list" template="post/list.phtml" >
 <block class="Magefan\Blog\Block\Post\PostList\Item" name="blog.posts.list.item" template="post/list/item.phtml">
                <block class="Magefan\Blog\Block\Post\Info" name="blog.post.info" template="post/info.phtml" />
                <action method="setProductInfoBlockName">
                    <argument name="name" xsi:type="string">blog.post.info</argument>
                </action>
            </block>
            <block class="Magefan\Blog\Block\Post\PostList\Toolbar" name="post_list_toolbar" template="post/list/toolbar.phtml">
                <block class="Magento\Theme\Block\Html\Pager" name="post_list_toolbar_pager"/>
            </block>
            <action method="setToolbarBlockName">
                <argument name="name" xsi:type="string">post_list_toolbar</argument>
            </action>
</block>

@virani06
Copy link
Author

Hello sir
Suppose i want to call like
{{block }} in cms page of admin panel so how can i call using only block class.

@magefan
Copy link
Owner

magefan commented May 10, 2016

@virani06 in this case plees update to the latest version and use magento widget functionality in cms pages and blocks

@s00071609
Copy link

Tried to enable commenting with facebook and disqus but the commenting part does not seem to work. I am not sure what else needs to be done. Links in your documentations take to pages that does not exist. Just created Fb App ID and entered it, did not work. Created Disqus shortname, still did not work. Is this some kind of bug? if you wish to check the url to blog is - https://jostechecig.com.au/blog/post/destructive-nicotine-addiction-and-cigarette-smoking-facts-and-misconception-about-quitting/

@sanganagouda1
Copy link

sanganagouda1 commented Jan 24, 2018

how to change the url from "http://magento2/blog/post/post-name/" to
so i want to change url like "http://magento2/news/new/post-name/ ??

@magefan
Copy link
Owner

magefan commented Jan 24, 2018

Please navigate to Stores > Configuration > Blog > Permalink Settings to change this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants