We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31144
    • 3 Posts
    I would like to know where i can find the PhP that generates the html for the [+pages+] placeholder. All I am trying to do is add a nonbreaking space inside the ditto_currentpage span. and inside of all the ditto_page anchors. Any help would be appreciated. thanks.
      • 7231
      • 4,205 Posts
      The pages is 100% templatable in the current Ditto release. Look in the Ditto snippet (in the manager), close to the end of the parameters there is the information for this. You do not need to edit the Ditto file you can use tpls (if you edit the Ditto file it will need to be reedited after upgrades) - Tip: create a confic file with the pagination templates you want, the config will only overwrite parameters used in the config so you can stack the remainng parameters [[Ditto? &config=`myPaginate` &parents=`2` ... ]] ):

      $tplPaginatePrevious = isset($tplPaginatePrevious)? $ditto->template->fetch($tplPaginatePrevious) : "<a href='[+url+]' class='ditto_previous_link'>[+lang:previous+]</a>";
      		/*
      			Param: tplPaginatePrevious
      
      			Purpose:
      			Template for the previous link
      
      			Options:
      			- Any valid chunk name
      			- Code via @CODE
      			- File via @FILE
      
      			Placeholders:
      			url - URL for the previous link
      			lang:previous - value of 'prev' from the language file
      		
      			Related:
      			- <tplPaginateNext>
      			- <paginateSplitterCharacter>
      		*/
      		$tplPaginateNext = isset($tplPaginateNext)? $ditto->template->fetch($tplPaginateNext) : "<a href='[+url+]' class='ditto_next_link'>[+lang:next+]</a>";
      		/*
      			Param: tplPaginateNext
      
      			Purpose:
      			Template for the next link
      
      			Options:
      			- Any valid chunk name
      			- Code via @CODE
      			- File via @FILE
      
      			Placeholders:
      			url - URL for the next link
      			lang:next - value of 'next' from the language file
      		
      			Related:
      			- <tplPaginatePrevious>
      			- <paginateSplitterCharacter>
      		*/
      		$tplPaginateNextOff = isset($tplPaginateNextOff)? $ditto->template->fetch($tplPaginateNextOff) : "<span class='ditto_next_off ditto_off'>[+lang:next+]</span>";
      		/*
      			Param: tplPaginateNextOff
      
      			Purpose:
      			Template for the inside of the next link
      
      			Options:
      			- Any valid chunk name
      			- Code via @CODE
      			- File via @FILE
      
      			Placeholders:
      			lang:next - value of 'next' from the language file
      		
      			Related:
      			- <tplPaginatePrevious>
      			- <paginateSplitterCharacter>
      		*/
      		$tplPaginatePreviousOff = isset($tplPaginatePreviousOff)? $ditto->template->fetch($tplPaginatePreviousOff) : "<span class='ditto_previous_off ditto_off'>[+lang:previous+]</span>";
      		/*
      			Param: tplPaginatePreviousOff
      
      			Purpose:
      			Template for the previous link when it is off
      
      			Options:
      			- Any valid chunk name
      			- Code via @CODE
      			- File via @FILE
      
      			Placeholders:
      			lang:previous - value of 'prev' from the language file
      	
      			Related:
      			- <tplPaginatePrevious>
      			- <paginateSplitterCharacter>
      		*/
      		$tplPaginatePage = isset($tplPaginatePage)? $ditto->template->fetch($tplPaginatePage) : "<a class='ditto_page' href='[+url+]'>[+page+]</a>";
      		/*
      			Param: tplPaginatePage
      
      			Purpose:
      			Template for the page link
      
      			Options:
      			- Any valid chunk name
      			- Code via @CODE
      			- File via @FILE
      
      			Placeholders:
      			url - url for the page
      			page - number of the page
      	
      			Related:
      			- <tplPaginatePrevious>
      			- <paginateSplitterCharacter>
      		*/
      		$tplPaginateCurrentPage = isset($tplPaginateCurrentPage)? $ditto->template->fetch($tplPaginateCurrentPage) : "<span class='ditto_currentpage'>[+page+]</span>";
      		/*
      			Param: tplPaginateCurrentPage
      
      			Purpose:
      			Template for the current page link
      
      			Options:
      			- Any valid chunk name
      			- Code via @CODE
      			- File via @FILE
      
      			Placeholders:
      			page - number of the page
      	
      			Related:
      			- <tplPaginatePrevious>
      			- <paginateSplitterCharacter>
      		*/
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don&#39;t know what it is.
        Do you, Mr. Jones? - [bob dylan]