If current page is a certain page type then return a string
Permalink 1 user found helpful
Hi there,
I'm fairly new to concrete5 and new to PHP, so I am looking for some assistance, please.
In my theme, I have set a page to a 'blog_entry' type.
To test what I'm trying to achieve, in my page template, I added the syntax:
Which correctly outputs 'blog_entry' as a text string.
When I try to echo a different string based on the output, the wrong values are being returned.
The full code I'm using at the moment is:
This returns: This page is not a blog entry blog_entry.
If any one could please advice why the correct string isn't being returned then that would be very helpful.
Thanks
I'm fairly new to concrete5 and new to PHP, so I am looking for some assistance, please.
In my theme, I have set a page to a 'blog_entry' type.
To test what I'm trying to achieve, in my page template, I added the syntax:
<?php echo $c->getCollectionTypeHandle(); ?>
Which correctly outputs 'blog_entry' as a text string.
When I try to echo a different string based on the output, the wrong values are being returned.
The full code I'm using at the moment is:
This returns: This page is not a blog entry blog_entry.
If any one could please advice why the correct string isn't being returned then that would be very helpful.
Thanks