Pagination [+next+] not working on MODx CMS template - pagination

I'm having difficulty getting the pagination functionality working with [[Ditto? ... ]] in MODx CMS.
I have the documents displaying in the page, limit is set to 5. The output from my other pagination template placeholders seem to be working but the [+next+] link doesn't load the next set of 5 documents (going in descending date order).
Here's my template code:
[[Ditto?
&parents=`13`
&tpl=`ArticleListChunk`
&display=`5`
&&removeChunk=`Comments`
&paginate=`1`
&extenders=`summary,dateFilter`
&paginateAlwaysShowLinks=`0`
&dateFormat=`%F %D %Y`
]]
<p>Showing <strong>[+start+]</strong> - <strong>[+stop+]</strong> of <strong>[+total+]</strong> Articles</p>
<ul class="clearfix">
<li>[+previous+]</li>
<li>Page <strong>[+currentPage+]</strong> of [+totalPages+]</li>
<li>[+next+]</li>
</ul>
The output I get is:
Showing 1 - 5 of 17 Articles
Page 1 of 4
Next >
as you can see the output is correct, however when I click the 'next' link the resulting URL is .../news.html?start=5 but the content of the page stays the same (i.e. the latest 5 documents are shown!).
This is how the template and functionality was when I was inherited this project from a client, and I have never used MODx CMS before -- can anyone help me please?
I there a way to update the SQL offset with a parameter or something? I've been all through the Wiki pages for Ditto / MODx but can't find what I need or what I should be doing that I'm not!

I would think you need to call ditto uncached [[!Ditto? attribs ]]
That's just a guess.
Also it looks like you are using EVO? check the cache syntax, you might need to put an exclamation mark at the end as well. [[!Ditto? attribs !]]

After plenty of searching I found a post on the MODx forum that pointed me in the right direction.
Turns out that caching was enabled in the page/document's settings (doh!). I disabled this and now it works fine!
However I have not set the no-caching token ('!') in Ditto's parameter string which, including the answer from Sean, my research has suggested is advisable and/or required. I've not worked with MODx before so I can't say for certain, but it seems to work without this for me!
Thanks #SeanKimball as your answer set me down the right path.

Related

Kentico 9 blog main page, archive page, and tag page

I'm new to Kentico, and have spent hours trying to make the blog work but haven't had any luck. Hope someone could help. I created a new blog by [a] using Pages > New Page > Blog; [b] then applying the Blog page template to it; [c] after that I created 2 sample blog posts. The only thing that works is the individual blog post. Other things don't work:
1- the blog main page --> empty
2- the blog archive page (for July) --> empty
3- tag link --> error message "Page /Blogs/My-blog-1.aspx was not found." Although I know I can change the tag link url, not sure what should be in there.
4 - making "Blog" appears on my nav (that I used CSS List menu web part). For this one, as a workaround, I was thinking about adding a blank "Blog" page and had it redirected to the blog url.
I've read the documentation related to Blog, but couldn't make it to work. Thanks for help!
Some of the out of the box templates are setup in such a way to only work on some of the example site templates which is why you're getting these results.
In the rptAllPosts repeater, set the Path property to ./%, ensure the Page types property is set to cms.blogpost, make sure you have a value in the Transformation property as well.
Should be resolved when you finish #1
You will have to modify the Selected Transformation. If you're using the default transformation, about line 9, way at the end you will need to modify the last parameter from ~/Blogs/my-blog-1.aspx to ~/Blog. This should fix the blog tag link.
Your work-around is very common and I'd stick with it for now.

OpenCart 2.0: How To Remove Billing Details from Chekout Page

Basically, I want to remove Step 2: Billing Details from the Checkout Page of OpenCart 2.0. My site will only be accepting bank deposits, cash on delivery, and pickup from store as methods of payment so I will not be needing Step 2. How do I go about this?
I've seen a lot of how-tos but not for OpenCart 2.0. The code seems to have changed quite a bit from the previous releases and I'm at a lost.
Thank you for the help!
I know this is quite old but i just got stuck with the same problem and found a solution without using any extension.
To completely remove the billing address on checkout on the 2.0.3.1:
Comment or remove the else HTML on the else of this: if (!$logged && $account != 'guest')(32);
Find the javascript code: $(document).delegate('#button-payment-address', 'click', function() {(338) and find inside the delegate method the code: if ($shipping_required)(373), copy the javascript code(393), it should be an ajax call and delete the whole delegate javascript code that we just found
Find the if (!$logged)(124) code and replace the else javascript code with the ajax call you just copied.
Have you tried
Opening your checkout.tpl
catalog\view\theme\default\template\checkout\checkout.tpl
Find
$('#payment-address .checkout-content').html(html);
$('#payment-address .checkout-content').slideDown('slow');
replace with
$('#payment-address .checkout-content').html(html);
$('#payment-address #button-payment-address').click();
and change
<div id="payment-address">
to
<div id="payment-address" style="display:none">
Since you do not need any billing method and If step 2 is skipped, then step 3 and step 4 can be skipped by default.
go to catalog\controller\checkout\checkout.php and comment the following line to disable step 2 and skip to step 5.
$this->data['text_checkout_payment_address'] = $this->language->get('text_checkout_payment_address');
$this->data['text_checkout_shipping_address'] = $this->language->get('text_checkout_shipping_address');
$this->data['text_checkout_shipping_method'] = $this->language->get('text_checkout_shipping_method');

Use a Tag as Page Title in Kentico

I have a tag cloud on product listing pages on my site that goes to a tag results page which displays products that contain that chosen tag. I want to put a header at the top of that results page that says something like "Products Tagged As: (insert tag name here)"
Any advice? I can't seem to access the system variable that displays the currently chosen tag name. The page URL contains the tagID variable, if that helps:
Product-Features.aspx?tagid=36
I am using Portal Engine Kentico development, by the way. Thanks.
I know this question has been asked a while ago. But I am posting my answer just in case if anyone come across this question they can use this snippet.
Try using following macro
{%tag="";foreach(g IN SiteObjects.TagGroups){foreach(t IN g.Tags){if(t.TagID=ToInt(QueryString.tagid)){tag=t.TagName;}}}return tag;%}
Note: I am using Kentico Version 9.0
For some reason the macro doesnt work in page template directly, I put the above macro in a Static Text webpart its worked like a charm.
Hope it would help someone like myself.
Regards,
Gopala
Use following macro:
{% GlobalObjects.Tags.Where("TagID = " + ToInt(QueryString.GetValue("tagid", 0))) %}

How wappalyzer(Mozila addon),GTmetrix finds the cms platform

I am currently developing a site which is not supposed to expose its developer magento platform(Sorry about that ).
I thought the wappalyzer(Mozila addon),GTmetrix site is finding the cms names by its html format but when i saw a empty white page with that tools it still shows me like am using Magento(there is nothing in the source view - its white page), so now how they are finding that am using magento. Any idea about hw they are working? I checked headers but there nothing specially mentioned as magento. Same goes with wordpress/joomla - simply wappalyzer(Mozila addon),GTmetrix finds the site platform even there is no html source.
So I guess something with in header(i might missing something) or what it can be? please advice. Attached screenshot of it.
Thanks in advance
You can view Wappalyzer's source code: (Ctrl+F Magento):
https://github.com/ElbertF/Wappalyzer/blob/master/share/js/apps.js
Most likely Wappalyzer picked up on the "Mage" JavaScript variable. You can see this by clicking the DOM tab in Firebug.
They are finding it using the words like mage,varien,magento. If it finds any of these words inside css/js file class,#id,inside comment then it found it as magento.
Also gtmetrix does one more step , like it is checking the css/js url path - if it fins the url like skin/frontend then it says it as magento.
Dont forget cookies...
I use FireBugs. Go to main menu -> Cookies
There is frontend in cookies.

How does one correctly set the target page of indexed search results in typo3?

I am working with typo3 4.7 and trying to redirect the search results of the indexed search plugin to a page in my site and managed to stumble upon the constants editor where I've managed to use it to guide me in setting up the object. Below is the current typoscript of the object in my root template (mapped into a TV template):
# --- SEARCHBOX OBJECT ----------------------------------
lib.searchbox < plugin.tx_indexedsearch
lib.searchbox{
#Disable the advanced search link
show.advancedSearchLink = 0
show.rules = 0
show.alwaysShowPageLinks = 1
#pid of root page is 1 and pid of the search result page is 9
search.rootPidList = 1
search.targetPid = 1
view.defaultPid = 9
result_link_target = 9
}
Thus far I have been unsuccessful in my attempts and all results are displayed in the page in where the search was performed. I would also like to know if it is possible to modify the displayed search box so that only the search field is displayed.
Thanks for your time.
Edit: I have installed and I'm trying out solr, if anyone has any experience with it pls feel free to help resolve this issue. My two problems with solr so far is that whilst search does re-direct to the right page, (1) the search box is way too big so I need to be able to modify the display of this box (to remove the button and reduce the size) (2) it spouts som e messages about search rules and returns nothing so far.
Edit 2: Seems solr is the way forward. I have managed to get everything I want done except the result output. I lost a few days (5) before realising that the tomcat container was bound to an ipv6 protocol interface. Resolving that (see here for those who may stumble upon the same problem for how to resolve this) has meant I can now remotely admin the solr server for more information. The pages are being indexed (Not regularly as specified in the scheduler) but I still get no results on the result page, and devlog only returns warning about there not being typo3 search markers despite my TV templates being peppered with them. I can only guess that maybe I'm to mark the results page with some type of marker to get the results to show at this point.
plugin.tx_indexedsearch {
search {
targetPid >
targetPid = 123
}
}
Reference: http://lists.typo3.org/pipermail/typo3-team-core/2010-March/036269.html
Experience: works even in TYPO3 version 6.x.
Default setting for plugin.tx_indexedsearch.search.targetPid is:
plugin.tx_indexedsearch {
search {
# TSFE:id is always the current page
targetPid.data = TSFE:id
}
}
I have never used the indexedsearch plugin as the searchbox on all of my pages.
Normally, I do this
Create a page with the indexed_search plugin as its content, this is
where all search requests are answered
Use macina_searchbox to
display a search box as part of the template
To elaborate:
Install macina_searchbox, and use this Typoscript to configure it
plugin.tx_macinasearchbox_pi1 {
pidSearchpage = {PID_OF_SEARCH_RESULT_PAGE}
templateFile = {PATH_TO_TEMPLATE_FILE_FOR_SEARCH_BOX}
}
Then, include macina_searchbox like so
lib.searchbox < plugin.tx_macinasearchbox_pi1
The search result page just needs the indexed_search plugin where you want the results to be displayed.
I would just create a search box, copy the HTML-Code, adjust action-url and HTML-Code and output it. IMHO there is no need, to render it via Plugin, if you just need an search-input field and an button. But do not forget the hidden fields!

Resources