We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

what is wrong with this call to the channel

Development and Programming

IrishManInUSA's avatar
IrishManInUSA
15 posts
14 years ago
IrishManInUSA's avatar IrishManInUSA

<?php

$segment2 = $this->EE->uri->segment('2');
$seg = ($segment2 == "") ? ('{segment_1}') : ('{segment_2}');
echo $seg;

?>

{embed ="/_embeds/html-header/"}

TEXT HHERE SHOWS

{exp:channel:entries channel="{segment_1}" url_title="<? echo $seg; ?>" limit="1" disable="trackbacks|pagination|member_data|categories" dynamic="off"}

FROM HERE ON DOESNT

I am not sure why the call to the channel wont work, the channel exists, but nothing is being pulled back.

       
Click Rain 1's avatar
Click Rain 1
9 posts
14 years ago
Click Rain 1's avatar Click Rain 1

Probably stating the obvious, but if the PHP isn’t getting parsed the “url_title” parameter would be blank–which wouldn’t return any results from the channel:entries tag. Double-check the PHP parse order?

Or is the channel:entries tag completely killing output?

Edit: The PHP Parsing Stage should be set to “input” to meet your needs. Yes, I’m ashamed that I can never remember that without looking it up.

       
IrishManInUSA's avatar
IrishManInUSA
15 posts
14 years ago
IrishManInUSA's avatar IrishManInUSA

isn’t always the case, as soon as I post something, that I have being trying to debug for the past hour. I end up figuring it out, the probably was in the database, even though I had the channel name correct, the url title didn’t match. 😊 Go figure.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.