Note that there are some explanatory texts on larger screens.

plurals
  1. POcakephp pagination change urls to make them more seo friendly
    primarykey
    data
    text
    <p>I am using this syntax:</p> <pre><code>&lt;ul&gt; &lt;?php echo $this-&gt;Paginator-&gt;prev($this-&gt;Html-&gt;image('arrow_left.png', array('border' =&gt; 0, 'tag'=&gt;'li')), array('escape'=&gt;false, 'tag'=&gt;'li')); ?&gt; &lt;?php echo $this-&gt;Paginator-&gt;numbers(array('separator' =&gt; '', 'tag'=&gt;'li')); ?&gt; &lt;?php echo $this-&gt;Paginator-&gt;next($this-&gt;Html-&gt;image('arrow_right.png', array('border' =&gt; 0, 'tag'=&gt;'li')), array('escape'=&gt;false, 'tag'=&gt;'li')); ?&gt; &lt;/ul&gt; </code></pre> <p>which creates me links like</p> <pre><code>&lt;li&gt; &lt;a href="/mycontrollername/search/cat:1/page:4?url=slugged_url"&gt;4&lt;/a&gt; </code></pre> <p>Is there any way, that I can get rid of the controller and action in the url and use instead the url parameter?</p> <p>I mean instead of getting links like</p> <pre><code>http://domain.com/mycontrollername/search/cat:1/page:2?url=slugged_url </code></pre> <p>I would like to get something like</p> <pre><code>http://domain.com/slugged_url/cat:1/page:2 </code></pre> <p>Is that possible? If yes, how?</p> <p>I have the same issue with results per page:</p> <pre><code>&lt;?php $sortDir = ($this-&gt;Paginator-&gt;sortDir() == 'asc') ? $this-&gt;Paginator-&gt;sortDir(): 'desc'; $text = ($sortDir == 'asc')? __('aufsteigend', true):__('absteigend', true); echo $this-&gt;Paginator-&gt;sort('OBJ_PREIS', $text, $options = array('escape' =&gt; false, 'direction'=&gt;'DESC', 'class' =&gt; 'asc'))`; ?&gt; </code></pre> <p>Can I change the urls there as well?</p> <p>Please advice!</p> <p>Thanks!!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload