What is {{fieldname title}}? How do you get that value?
On Tuesday, August 21, 2012 4:31:54 PM UTC-4, SeamusSeamus wrote:
>
> Thanks, what about URLs so it is
> www.domain.com/product/{{fieldname<http://www.domain.com/product/%7B%7Bfieldname>title}}
>
>
> On Tuesday, August 21, 2012 10:56:49 AM UTC-6, Anthony wrote:
>>
>> You can set response.title and response.meta in the controller or
>> function to make it specific to particular controllers or functions (or you
>> can set them conditionally in a model file). If you need to use a database
>> value, just do a query to get the value (your probably want to cache it to
>> improve performance).
>>
>> Anthony
>>
>> On Tuesday, August 21, 2012 12:49:00 PM UTC-4, SeamusSeamus wrote:
>>>
>>>
>>> 1. What is the easiest way to make it so each page has it's own title?
>>> Currently it is set by layout.html, but what if I want its own page to have
>>> an independent title?
>>> 2. How can I make it so the <title> of the page is the "name" of a field
>>> in a model? I am using SQLForm now, and have /product/1 and would like to
>>> have /product/purple-desk
>>> 3. How can I make it so the meta description on each page has its own ?
>>> For example, the description is the data in the field 'product description'
>>> used in the model.
>>>
>>> Thanks.
>>
>>
--