x
 
Create New Page
 View Previous Changes    ( Last updated by Lisa Wess )

Multiple Weblog SAEF

Question:

How can I set up one Stand Alone Entry Form template to post to multiple weblogs?

Answer:

The way to do this would be to create multiple links for each weblog that can be posted to via the SAEF. Then pass the third segment to the SAEF.

Let’s make up some weblogs, for this: weblog1, weblog2, weblog3.

Now, you make up URLs like this

Plain set of URLs

<a href="{path=weblog/saef}weblog1">Write a post on weblog1</a>
<
a href="{path=weblog/saef}weblog2">Write a post on weblog2</a>
<
a href="{path=weblog/saef}weblog3">Write a post on weblog3</a>

URLs in a Dropdown

<form name="weblogmenu" action="">
<
select name="selweblog" onchange="location=document.weblogmenu.selweblog.options[document.weblogmenu.selweblog.selectedIndex].value;">
<
option value="">--Select Weblog--</option>
<
option value="{path="weblog/saef"}weblog1">Write a post on weblog1</option>
<
option value="{path="weblog/saef"}weblog2">Write a post on weblog2</option>
</
select>
</
form>

In the above sets of code, you’re calling the template “saef” in the template group “weblog” and appending a third, otherwise unused segment. Now you pass the third segment to the SAEF.

In your opening tag for the SAEF, you’d use:

{exp:weblog:entry_form weblog="{segment_3}" return="weblog/index" preview="weblog/saef"}

Category:Templates

Categories: