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

Suggestion - remove the requirement of URLs #15

Open
darylknight opened this issue Apr 17, 2019 · 10 comments · May be fixed by #35
Open

Suggestion - remove the requirement of URLs #15

darylknight opened this issue Apr 17, 2019 · 10 comments · May be fixed by #35

Comments

@darylknight
Copy link

darylknight commented Apr 17, 2019

To get a section to be usable for the User Manual, it must have URLs enabled. There are two downsides to this:

  • http://domain.test/user-manual/entries resolves to the home page, because Craft resolves the template in Site Settings
  • SEOmatic registers it as a section which needs Content SEO set up on it, which is irrelevant because it shouldn't be viewable on the front end.

Any chance of letting it somehow use a section which doesn't have URLs?

@RobErskine
Copy link
Owner

Hey @darylknight, wanted to confirm receipt on your suggestion. Lemme look into it over the next few days and see what we can come up with for using a section/structure with no URLs.

@RobErskine RobErskine self-assigned this Apr 17, 2019
@darylknight
Copy link
Author

Really appreciate the acknowledgement Rob! Thanks for looking into it.

@missmatsuko
Copy link

Any update on this? I would like this requirement to be removed as well. The User Guide is meant for CMS users, not website users. The User Guide pages should not be accessible from the front-end of the site.

@RobErskine
Copy link
Owner

Hey @missmatsuko, apologies for the delay on this. Been busy with client work and haven't had time to work on open-source stuff.

I go back and forth on if user's who aren't logged in should see the documentation. It certainly depends on the type of documentation you write and what audience you are going for. You can remedy this for your use case by adding some twig to your user manual template:

{%  if not currentUser %}
  {% redirect '/' %}
{% endif %}

{{entry.body}}

This will redirect users who aren't logged in to the homepage if they try to hit one of the user manual pages from the front-end.

@darylknight
Copy link
Author

Thanks for the update Rob. I understand client work getting in the way (snowed under myself), although did want to chip in on this. I'd argue that documentation about how to use the CMS should only be available within the CMS. It's not public information that needs to be accessed by random users, and from the original issue - shouldn't be in the sitemap either.

@missmatsuko
Copy link

So I'm kind of confused when you would want to use this plugin for documentation that intentionally shows on the front-end. Why not just use Craft's entries with your own templates and just look at it from the front-end of the site (or in the entry preview)?

Also the redirect in template solution doesn't address the entries showing in the sitemap, as @darylknight said.

@RobErskine
Copy link
Owner

We host sites where some documentation is available on the front-end and others where it's not. It depends on if it's customer-facing, if there is documentation that is needed for logged-out users, etc. User Manual is unopinionated about how you use your content.

Through various sitemap plugins, like SEOmatic, you can tell it to ignore certain sections or entries altogether. SEOmatic has a whole robots.txt configuration you can use to tell it not to appear in search results or in sitemaps.

We welcome PRs if you want to take a stab at implementing your intended solution.

@lindseydiloreto
Copy link

I agree with @darylknight and @missmatsuko on this one... I don't see myself using this plugin outside of the control panel. Craft provides a myriad of ways to get to Entry data, there are other avenues for people to wire their documentation up to the front-end.

I came here to ask for a toggle switch (#20), but this solution is way better IMO.

@laurabennett
Copy link

Wondering if there is any update on this? I'm running into some SEO redirect issues because the slugs being used by my documentation are being displayed rather than the pages that are meant for front-end users.

@daltonrooney
Copy link

I just published a small PR that (I think) accomplishes this. By using entry IDs in the CP URL requests instead of slugs, the plugin works just fine when the entries section used for User Manual does not have public URLs.

Any thoughts?

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

Successfully merging a pull request may close this issue.

6 participants