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

Page title #8

Closed
Fidelity88 opened this issue Jul 19, 2018 · 3 comments
Closed

Page title #8

Fidelity88 opened this issue Jul 19, 2018 · 3 comments

Comments

@Fidelity88
Copy link

How can we set or change the Blog page title?

@trucatchtraps
Copy link

trucatchtraps commented Jul 30, 2018

I had to customize the module to do this as well. In your custom theme, create the directory Prince_Faq/layout. Copy the faq_index_index.xml file to this new directory. Use something like this, which will add the title and breadcrumbs:

<?xml version="1.0" ?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

<head>
    <title>Frequently Asked Questions</title>
    <!-- <css src="Prince_Faq/css/faq.css"/> -->
    <!-- <link src="Prince_Faq/js/faq.js"/> --> 
</head>
	

<body>

	<referenceBlock name="page.main.title">
		<action method="setPageTitle">
			<argument translate="true" name="title" xsi:type="string">Frequently Asked Questions</argument>
		</action>
	</referenceBlock>
	
	<referenceBlock name="breadcrumbs">
        <action method="addCrumb">
            <argument name="crumbName" xsi:type="string">Home</argument>
            <argument name="crumbInfo" xsi:type="array">
                <item name="title" xsi:type="string">Home</item>
                <item name="label" xsi:type="string">Home</item>
                <item name="link" xsi:type="string">{{baseUrl}}</item>
            </argument>
        </action>
        <action method="addCrumb">
            <argument name="crumbName" xsi:type="string">Frequently Asked Questions</argument>
            <argument name="crumbInfo" xsi:type="array">
                <item name="title" xsi:type="string">Frequently Asked Questions</item>
                <item name="label" xsi:type="string">Frequently Asked Questions</item>
            </argument>
        </action>
        </referenceBlock>
	
	<!-- 
	<referenceContainer name="content">
		<block class="Prince\Faq\Block\Index\Index" name="index.index" template="Prince_Faq::index/index.phtml"/>
	</referenceContainer>
	-->
	
</body>
</page>

@mageprince
Copy link
Owner

Hi @trucatchtraps Thanks for your reply.

@mageprince
Copy link
Owner

Hi @Fidelity88 You can add the title in

view/frontend/layout/faq_index_index.xml

<referenceBlock name="page.main.title"> <action method="setPageTitle"> <argument translate="true" name="title" xsi:type="string">FAQ Page</argument> </action> </referenceBlock>

I will add this improvment in next version of this module.

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

3 participants