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

[NFR] - Add method to generate friendly_title #69

Closed
niden opened this issue Sep 10, 2012 · 2 comments
Closed

[NFR] - Add method to generate friendly_title #69

niden opened this issue Sep 10, 2012 · 2 comments
Milestone

Comments

@niden
Copy link
Member

niden commented Sep 10, 2012

Hi there,

I'd like to be able to (for example) add an 'alt' tag to the image function of Phalcon\Tag, i.e like in Fuel :

echo Asset::img('logo.png', array('alt' => 'logo'));

Also, currently when using Tag::image or Tag::javascriptInclude it doesn't add a newline at the end, is this normal behaviour?

Thanks for the awesome work so far!

Oh yeah, I forgot. An ability to generate a 'slug' from a string would be awesome as well to create url's and stuff

( like http://docs.fuelphp.com/classes/inflector.html#method_friendly_title )

@niden
Copy link
Member Author

niden commented Sep 10, 2012

Phalcon\Tag::image allows you to add as many attributes as you need

111php
$options = array(
'img/hello.gif',
'src' => 'img/goodbye.gif',
'class' => 'some_class',
);
$expected = '';
$actual = Tg::image($options);

You can therefore add the alt tag at any point in the options.

As for the slug, that is a great suggestion.

@phalcon
Copy link
Collaborator

phalcon commented Oct 7, 2012

This was addressed in 0.6.0

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

1 participant