Skip to content

Commit

Permalink
fix pathname in listing view
Browse files Browse the repository at this point in the history
  • Loading branch information
nileshgulia1 committed Jan 12, 2022
1 parent ec5706e commit 511ddaa
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { connect } from 'react-redux';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Helmet } from '@plone/volto/helpers';
import { Helmet, getBaseUrl } from '@plone/volto/helpers';
import { defineMessages, injectIntl } from 'react-intl';

import { Container, Image } from 'semantic-ui-react';
Expand Down Expand Up @@ -78,7 +78,7 @@ class DefaultView extends Component {

render() {
// console.log('im default view');
const { content, intl } = this.props;
const { content, intl, location } = this.props;
const blocksFieldname = getBlocksFieldname(content);
const blocksLayoutFieldname = getBlocksLayoutFieldname(content);

Expand Down Expand Up @@ -113,6 +113,7 @@ class DefaultView extends Component {
id={block}
properties={content}
data={content[blocksFieldname][block]}
path={getBaseUrl(location?.pathname || '')}
/>
) : (
<div key={block}>
Expand Down

0 comments on commit 511ddaa

Please sign in to comment.