zend framework2 - what's best approach permalink database with zf2 and doctrine2? -
I am creating a web site with zf2 and theory how can I save the permacquatch in my database? What is the best way? Should I have Permalink saved in my institutions?
// Product Docctin unit public function setprodername ($ prodName) {$ this- & gt; ProdName = $ prodName; // is this the right way? $ This- & gt; SetSeoLink = urlhelper-> Url ($ prodName); } "
I suggest you use your URL to hash, like < / P> <<> /this-is-the-product-title-xyz123.html
Where xyz123 is the hash of your product.
By doing this you can change the title of your product at any time, your product can always be accessed on the search engine or other website, For example, both
/this-is-my-product-xyz123.html
and
/ It is-my-amazing-product-xyz123 .html
will work.
2) You are not showing people the real identity.
I used the module to accomplish this, to create a factory service that already returns the configured object, you can encrypt / decrypt using this code:
$ hashish = $ this-> getServiceLocator () - & gt; Service.hashid '); // decrypt hash $ id = $ hashids- & gt; Decrypt ($ hash); // Encrypted ID is $ hash = $ hashade- & gt; Encrypt ($ ID);
.html suffix Just as an example, you can make your URL according to your wish.
Comments
Post a Comment