To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Ticket #206 (closed enhancement: fixed)

Opened 23 months ago

Last modified 22 months ago

Edit View - Allow People To Set The Slug

Reported by: geoffd Owned by: dordille
Priority: critical Milestone: 1.4
Component: apostropheBlogPlugin Version: 1.0
Keywords: lab-day Cc: johnnyoffline, rickybanister, agilbert, boutell, dordille,
Symfony version: 1.4

Description

Right now the slug for a blog post defaults to the ID.

We should have it default to the title of the post.

We should then show the slug beneath the title and allow people to edit it. Probably show it as text with a little edit button. (John should suggest something for how that should work.)

Attachments

chchchchange-the-slug.png Download (16.0 KB) - added by johnnyoffline 23 months ago.
Slug Sample
permalink-url.png Download (7.8 KB) - added by johnnyoffline 22 months ago.
Permalink URL
permalink-slug-requirements.png Download (5.6 KB) - added by johnnyoffline 22 months ago.

Change History

Changed 23 months ago by dordille

  • component changed from Documentation to apostropheBlogPlugin

Changed 23 months ago by johnnyoffline

Slug Sample

Changed 23 months ago by boutell

We need a single slugifier that is also invoked for editing and changing page slugs... some refactoring wanted here. It should be pluggable by setting a callable in app.yml so folks can come up with alternate ones that work for their funky character sets if they want.

Changed 23 months ago by johnnyoffline

Slug Sample

The slug field is empty until you type a post title. Any changes to the post title should update the slug UNTIL you publish the post. After the post is published, the slug is stable. The slug must be manually edited after the post is published.

The slug should be displayed as a live text field. We will style it to look editable onfocus. It should save onblur.

Changed 22 months ago by johnnyoffline

  • cc dordille, added
  • owner changed from dordille to johnnyoffline
  • status changed from new to assigned
  • summary changed from Allow people to set the Slug to Edit View - Allow People To Set The Slug

Dan, I am going to mock this up with javascript / css so that it "looks" right.

When I get it there, I will assign this back to you for making it actually submit and store to the database.

Changed 22 months ago by johnnyoffline

Permalink URL

Changed 22 months ago by johnnyoffline

Dan:

I need help assembling the "real" path to the post so it can be displayed as the permalink.

in editSuccess.php

Error: Macro Image(permalink-url.png) failed
Attachment 'ticket:206: permalink-url.png' does not exist.

<?php // Dan, Can you echo the REAL URL prefix here -- I don't know how to build a URL based on the complex blog route business we are doing  ?>

<div id="a_blog_post_permalink_interface">Permalink: http://site/blog/url/<?php echo $a_blog_post->slug ?></div>

Changed 22 months ago by johnnyoffline

Error: Macro Image(permalink-url.png) failed
Attachment 'ticket:206: permalink-url.png' does not exist.

Changed 22 months ago by johnnyoffline

Permalink URL

There's a space in the filename. Dolt!

Changed 22 months ago by johnnyoffline

  • owner changed from johnnyoffline to dordille

Dan, this is roughed in now.

There's notes in the file for you editSuccess.

Also, I am using a jquery.slugify.js to clean up the slug before it submits.

This is most likely temporary. I liked your idea for submitting one ajax call instead of two.

We can knock this out tomorrow.

Changed 22 months ago by johnnyoffline

  • keywords lab-day added

Changed 22 months ago by johnnyoffline

The slug is going to work like worpdress.

Upon first save it is set to the title of the post and will remain that way unless the blogger explicitly changes the slug.

From that point on the slug will reflect the original title even if the title is updated / changed after that point.

Changed 22 months ago by johnnyoffline

This works from a frontend perspective.

All of the markup and JS lives in editSuccess or aBlog.js

Please confirm that the slug works how we want it to (I think it does).

Then assign to Rick for review.

Thanks.

Changed 22 months ago by johnnyoffline

  • priority changed from major to critical

Changed 22 months ago by johnnyoffline

Changed 22 months ago by johnnyoffline


Dan:

The slug saves but nothing comes back from the server. I need a slugified slug to get returned from the server and passed back into my input field.

ALSO:

I need the URL leading up to the slug to be representative of something relating to where the post could be found in the site. Let's make this simpler rather than more difficult. Maybe something like this:

First Step: check if there is only 1 blog engine, if so, great use it to build the url preceding the slug.

I don't know, this feels like a design problem to me. Rick / Tom should weigh in on this part.

Changed 22 months ago by boutell

There's a weighty ticket on solving the second half of this problem already in which we worked through the design issues of how to pick the best engine page to use.

See #145

Changed 22 months ago by dordille

  • status changed from assigned to closed
  • resolution set to fixed

This has all been wrapped up. [1095]

Note: See TracTickets for help on using tickets.