umbraco fields within quotes Options
umbnow234
Posted: Monday, July 21, 2008 12:43:04 PM
Rank: Newbie

Joined: 7/16/2008
Posts: 2
Hi guys,

I have been using umbraco 4 beta and have noticed that the field tags have changed in their structure, what was once;

Code:
<?UMBRACO_GETITEM field="MetaDescription"/>


is now

Code:
<umbraco:Item field="MetaDescription" runat="server"></umbraco:Item>


Anyhow the new tag structure doesnt seem to like being placed within quotes as I had in umbraco 3

Code:

<meta name="description" content="<umbraco:Item field="MetaDescription" runat="server"></umbraco:Item>" />


trying the below causes some problems

Code:

<meta name="description" content="<umbraco:Item field="MetaDescription" runat="server"></umbraco:Item>" />


Code:
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Unexpected end of file looking for </meta> tag.

Source Error:

Line 4:      <head>
Line 5:          <title><umbraco:Item field="PageTitle" runat="server"></umbraco:Item></title>
Line 6:          <meta name="description" content="<umbraco:Item field="MetaDescription" runat="server"></umbraco:Item>" />


I tried being a lil bit clever and adding a inserttextbefore & after within the page field, but nothing gets inserted.

I can obviously put content="my content" as the content description within each page field, but that is silly.

Anyone know why the above is occurring?

thank you so much
Petr Snobelt
Posted: Monday, July 21, 2008 2:41:20 PM
Rank: Aficionado

Joined: 10/2/2007
Posts: 166
Location: Czech Republic
Try
<meta name="description" content='<umbraco:Item field="MetaDescription" runat="server"></umbraco:Item>' />

Petr
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.